251
submitted 3 years ago* (last edited 3 years ago) by to c/csharp@programming.dev
 
 

Link to GitHub issue: https://github.com/dotnet/csharplang/issues/7009

Link to video explaing it: https://youtu.be/91xir2oUQPg

252
 
 

Hi all! Trying to work with small pet project for myself. So I use few asp net core apps + db in docker and docker compose. And I little confuse about storing configuration (like for logging or db connection etc). Where is best place to store it? Continue use app.json or move .env files (enviroments variables)

I guess .env files more easy to configure f.e. on CI\CD So whatis a better?

253
 
 

There are many YouTube channels that specializes on C#, but not all of them are created equal. So, I thought, it would be good to share the ones that we think is worth taking a look at.

254
 
 

Hey guys,

I'm looking for a complete guide to C#. If it covers basic programming paradigms as well that would be a plus as I have coded a bunch of stuff but am lacking in theoretical knowledge.

I'm definitely open to spending money for a book or something like that. A full course would be outside of my price range though.

Maybe someone has any good suggestions! I obviously tried googling and had a look at microsofts learning resources but without having some feedback as to how good they are it is difficult to choose something.

255
 
 

I want to learn C# but I can't find time for it (even if I have entire days available)

256
 
 

With regards to null conditional operators, calling properties and methods will work fine, e.g.:

HttpContext.Current?.Response.Clear();

But I'm wondering if assignment is possible? I get this error when trying to do this:

HttpContext.Current?.Response.ContentType = "text/json";

The docs say:

The null-conditional operators are short-circuiting. That is, if one operation in a chain of conditional member or element access operations returns null, the rest of the chain doesn't execute.

So wondering if it's possible and I'm doing it wrong, or am I taking "does not execute" too literally? :)

257
 
 

Recently an idea came across my mind, and that is with all the fuss around Lemmy and fediverse in general, that i could spend my nights working on something instead of watching random YouTube stuff. So I've decided i could start building some kind of Android app, which will just be my time killer for the time being.

Just for some background info - I'm by no means considering myself a programmer, but I do write a lot of scripts/extensions/forms for software we use at work, which is mainly Microsoft stuff associated with .NET, so when it comes to programming I'm most familiar with C# and the whole .NET ecosystem. Lately I've also got into JS/TS with React as I wanted to create my own website.

Because I like C# as a language, i was looking into building this project in some kind of cross platform framework. I researched and found out about MAUI, Avalonia UI and such. As I was researching I found a lot of opinions on those frameworks, some of which were positive and some of which were negative. The negative ones outweigh the positive ones (bugs, broken basic features, messy workarounds, outdated underlying platform APIs) and such. I do know that such framework cannot be perfect because there is a lot of going on, and I would like to hear some more opinions.

So guys what are your experiences with those .NET frameworks? How is the XAML holding up? And do you think I would be better learning Flutter/Dart or straight up Kotlin, as the only platform I'm willing to develop for is Android?

Thanks!

258
259
 
 

New features for those who haven't seen them:

// Primary constructors
public class NamedItem(string name)
{
    public string Name => name;
}

// Default lambda params
var IncrementBy = 
    (int source, int increment = 1) => 
        source + increment;

Console.WriteLine(IncrementBy(5)); // 6
Console.WriteLine(IncrementBy(5, 2)); // 7

// Type aliases
using Point = (int x, int y);
260
 
 

Found this while researching how this fediverse thing works. ActivityStreams provide the vocabulary for interacting with Activitypub, which is the protocol the fediverse uses.

Here's more on ActivityPub, for the interested

261
Is Rider that great? (programming.dev)
 
 

I'm partly just posting this to get some more content going here...

...but I've been using Rider for the past year or so, and I'm not sure I can say it's better than Visual Studio. I find anytime it comes up it's all praise for Rider (including the debugger, which i find to be crap)

The Pros:

--IdeaVim is better than VsVim

--Feels a bit snappier

--The find in files pops up in a dialog box with "display as you type"

Cons:

--I really don't like the debugger layout. It's not customizable at all and I find I'm going back and forth between tabs all the time

--The debugger also doesn't have a second watch window, which blows my mind. (I often want to compare the state of 2 variables side by side, which is a huge pain in Rider)

--It has a bad bug where sometimes it won't recompile my changes, so I have adopted the workflow of always deliberately building before debugging, which is annoying.

--Doesn't work with WinForms

I just always see comments about how much better Rider is. It has some advantages, but it has some massive flaws IMO too. I'm not sure what I'm going to use going forward. Right now I'm developing in rider and debugging in VS.

262
 
 

Hey I started making an Azure functions bot so I made a quick lemmy HTTP client and decided to push it to Nuget

263
 
 

Just a random idea- but,

Would anyone be interested in having a .net based blazor front end for lemmy?

Sadly, there isn't yet a c# nuget package, but, that wouldn't be hard to fix.

https://join-lemmy.org/api/

The API itself, is pretty well documented.

And, building custom front-ends is encouraged as well.

https://join-lemmy.org/docs/en/contributors/04-api.html#creating-a-custom-frontend

264
 
 

There is no polling functionality on Lemmy, so please upvote the comment that you mostly agree with.

265
 
 

Another one of my C# articles, this time about Nullable.

266
 
 

New to web but has 10+ experience with console apps with c++ c#...decided to create a business / company around some ideas with my friend - same back - and decided to use .net for all.

Which techs do you advice to learn ?

** Training with blazor wasm, rabbitmq, web API .net...for a while. Just want to be sure if I forgot anything in core stack !

Thanks.

267
 
 

This is an older article of mine I wrote when C# was still my main language.

I don’t know if posting my own content is allowed here - if not, feel free to remove it, no hard feelings.

268
submitted 3 years ago by [M] to c/csharp@programming.dev
269
Let's play a game... (programming.dev)
submitted 3 years ago by [M] to c/csharp@programming.dev
 
 
270
Welcome to C#! (programming.dev)
submitted 3 years ago by [M] to c/csharp@programming.dev
 
 

Hey there! 👋

Welcome to our C# community on Lemmy! We're a group of programmers, hobbyists, and learners all keen about C#. Whether you're a pro or just getting started, we're excited to have you here.

Our goal? To learn, share, and collaborate on everything C#. Got questions, projects, or resources to share? Or simply want to discuss a feature you love (or not) about C#? This is your space!

Here are a few ground rules:

  1. Be respectful and considerate: Remember, we're all at different stages in our C# journey.

  2. Stay on topic: Let's keep discussions C# focused.

  3. No spamming or self-promotion: Share your projects, but don't overdo the self-promotion.

  4. Use appropriate language: No offensive language. Let's keep it positive!

So, let's dotnet build and Nuget Unable to resolve dependency

Cheers!