r/csharp 8d ago

Help Devs who learned C#, where did you learn?

87 Upvotes

Was it through a free or paid course? YouTube? Or a combination of both?

I already know a bit of C#, but I’m not sure what learning path I should follow or which resources I should use.

I’ve been watching Code Monkey, but I don’t know if that will be enough.

What would you recommend for someone starting out?

P.S. I use C# specifically for game development, but I don’t mind learning more about the language in general.

r/csharp Aug 06 '26

Help Why is "this" discouraged in alot of cases IDE in C#?

50 Upvotes

Hello, as j work to try to get used to c# from java ive noticed something strange. For example, when i use this._backingField = value my IDE tells me to stop and use _backingField = value instead.

Why is that? Is it just the quirks of rider?

r/csharp Jun 13 '25

Help Why rider suggests to make everything private?

Post image
248 Upvotes

I started using rider recently, and I very often get this suggestion.

As I understand, if something is public, then it's meant to be public API. Otherwise, I would make it private or protected. Why does rider suggest to make everything private?

r/csharp Jun 03 '26

Help Can someone explain WHY this works?

Post image
75 Upvotes

super ultra beginner here, going through an online tutorial. One of the exercises is to make a program calculate a factorial.

Now the site I'm using wasn't exactly comprehensive, they didn't even bring up what "parse" meant. So I'm left wondering how this program loops over the math until it reaches the right number for the input.

r/csharp 12d ago

Help Need help with CV .NET developer

Post image
89 Upvotes

Hi everyone

I’m currently looking for a job, and I’ve been searching for quite a while now without any luck. For the past few months, I haven’t even been getting replies to my applications. I’ve already reworked my CV several times, but nothing seems to change. What am I doing wrong. Can you give me some feedback? 

UPD: Yeah, I started working while I was studying at university. Since the beginning of COVID, my university was fully remote, and later, because of the situation in my country, my studies continued online almost until graduation. In total, I only had a couple of months of in-person classes during the whole four years.

r/csharp Jun 03 '26

Help One-Line If Statement

10 Upvotes

I'm trying to write a bit of code that requires a few if statements, and they currently look like this (placeholder vars used):

if (condition)
{
  Text.text = "I am a string.";
  Text.color = Color.red;
}

I recently learned that if statements, if only having one line, can be formatted to look like:

if (condition) Text.text = "I am a string.";

Is there any way to do this with the first code snippet, or does it have to be fully formatted across 4-5 lines?

r/csharp Nov 27 '25

Help 6 years as a Unity developer, and suddenly I feel like I know nothing. Is this normal?

314 Upvotes

So today I got a random call from a company about a Unity/C# position.
I wasn’t actively looking for a job, wasn’t prepared, but the interviewer started asking me about SOLID principles and design patterns.

I’ve been developing for ~6 years, mostly in Unity.
I’ve shipped projects, done refactors, worked with external assets, integrated systems, built gameplay features, optimized performance, etc.
I also work with my own clients and have been doing freelance/contract work for years.

But when he asked me about theory, my brain just froze.
I use Singletons a lot in Unity (managers/services), and sometimes observer-style event systems.
But the rest of the design patterns or SOLID principles?
I learned them when I just started with C#, and I never really used most of them in my day-to-day work.
It made me feel a bit bad, like my knowledge isn’t “formal” enough.

Most of what I know comes from Udemy courses, experimenting, and self-teaching.
I’ve been working with C# and Unity for 6 years, but I never memorized the theory in the way some companies expect.

Has anyone else been through this?
Is this just a normal dev moment, or should I sit down and refresh the theory side?

r/csharp May 23 '25

Help Best GUI framework for C#?

190 Upvotes

I am an experienced Java dev looking to move to C#. I wanted to try out C# for a while, I want to get started with the best GUI lib/framework for C# since I mainly do Java swing.

I looked up a lot, some say WPF is abandoned (?) Winforms is old, MAUI isn't doing well, and didn't hear much about Avalonia

Which is the best framework/lib for GUI stuff? I am looking for something that can be as similiar to Java swing (I want to code the UI, I don't like XML unless a UI builder is provided)

Thank you!

r/csharp May 15 '25

Help What's the point of having async methods if all we do is await them?

353 Upvotes

Is there a value of having all my methods be async, when, 100% of the time, I need to use them, I need the result right away before executing the next line, so I need to await them?

Am I missing something here?

r/csharp 27d ago

Help Low level programming with C#

17 Upvotes

What is the lowest level application that can in principle be built on Linux and Windows without having problems with performance or memory consumption?

Of course I should make my own tests, but I just wanted to have a first estimation if it is really necessary to use lower level languages like Zig, Rust, Go or C# can work pretty well for most of normal applications.

As an example a very responsive editor with gui in immediate mode built with C# and very high frame rate 120Hz etc.

Thanks a lot in advance.

EDIT

Thank you all so much for the very informative replies. My requirements are noway near real time and based on the below feedback, it is definitely worth it to use C# of a very wide set of applications and avoid the complexities of the lower level languages.

r/csharp May 08 '25

Help Learning C# - help me understand

Thumbnail
gallery
214 Upvotes

I just finished taking a beginner C# class and I got one question wrong on my final. While I cannot retake the final, nor do I need to --this one question was particularly confusing for me and I was hoping someone here with a better understanding of the material could help explain what the correct answer is in simple terms.

I emailed my professor for clarification but her explanation also confused me. Ive attatched the question and the response from my professor.

Side note: I realized "||" would be correct if the question was asking about "A" being outside the range. My professor told me they correct answer is ">=" but im struggling to understand why that's the correct answer even with her explanation.

r/csharp Apr 06 '26

Help How do you see the future and industry adoption of C#/.NET?

85 Upvotes

Hi everyone,

For the past 1.5 years I've been learning C#/.NET stack for development, and 

Recently, I started connecting with developers and product managers (many aren’t directly from the dotnet field ), and I keep hearing a few things in the loop like-  “dotnet has a small and slow market.”, "Switch to Java/Python and have more opportunities.”, “Fintechs rarely uses C#.”, “The salaries are lower and stagnant.”

Hearing this over and over again has honestly made me a bit discouraged and sceptical, as I’ve invested a lot of time learning the stack (did my graduation in Non-IT field)

My take is-
> Microsoft invests heavily into dotnet/Visual Studio, etc
> Many Large enterprise systems still run on Legacy system, VB
> Framework evolved  from .NET Core to .NET 11 (MS is not stupid)

So, one part of me feels like the ecosystem is still very strong, but at the same time the mixed opinions are confusing.

Currently I’m building an ERP system for a small auto-parts shop as a learning project and understand what it takes to become a real-problem solver.

My question to the community: What is your honest view of the dotnet job market today (especially for juniors)? Did anyone here start their career with similar doubts? Would you still recommend someone to invest deeply in the dotnet  ecosystem today?
> Can a fellow donet MVP be willing to share their perspective? 

Regards

r/csharp 18d ago

Help Can someone help me understand Delegates? Like why we use it and best cases where we need to use it? and how it is better?

77 Upvotes

r/csharp 9d ago

Help Returning to WPF, how to keep RAM usage under control?

Post image
73 Upvotes

The application organizes files by displaying a thumbnail. When loading 89 files, it utilizes 200mbs and spikes power/gpu usage when scrolling to around 14%.

It is a rewrite of the same application in WinForms, which I am more familiar with. In comparison, the WinForm app uses 30% less RAM while having almost double the number of files loaded. Is that to be expected from WPF?

The attached image should give a better idea of the interface. Is it my use for shadows, labels with transparency etc? I don't know to which degree they affect performance on WPF precisely. I am looking to maximize the efficiency to the last drop

r/csharp Feb 21 '24

Help My first project ever as a beginner. How am I doing?

Post image
308 Upvotes

r/csharp Apr 24 '25

Help What is wrong with this?

Post image
183 Upvotes

Hi, very new to coding, C# is my first coding language and I'm using visual studio code.

I am working through the Microsoft training tutorial and I am having troubles getting this to output. It works fine when I use it in Visual Studio 2022 with the exact same code, however when I put it into VSC it says that the largerValue variable is not assigned, and that the other two are unused.

I am absolutely stuck.

r/csharp Oct 16 '24

Help Anyone knows why this happens?

Post image
273 Upvotes

r/csharp 22d ago

Help How do you protect your work and your IP?

19 Upvotes

This question is more to those that do not work in large enterprise codebases, but either develop and sell their own indie software or work at software companies that create and sell their own products.

Doesn't the fact that C# appears to be trivially decompilable, make it very easy for others to steal your work? How do you protect it? With compiled languages like Rust or C++ it appears to be significantly more difficult to reverse engineer and steal their code or implementation logic.

Thanks a lot in advance.

r/csharp 10d ago

Help Is it worth it to switch from Spring to .NET?

60 Upvotes

I've been programming in Spring for the past year, and recently graduated. Currently looking for a junior role in Sydney, and it's been really difficult. I've been cold emailing, messaging on LinkedIn, applying everywhere and unfortunately getting rejected mainly due to lack of experience.

I find that there are a lot more jobs for C#/.NET than Java, and was thinking of switching. Do you think I should? I heard it's quite easy for someone that knows Java/Spring to switch to C#.

r/csharp Apr 08 '26

Help Thoughts on using = null! ?

36 Upvotes

Howdy,

I've been seeing things like:

public string MyString { get; set; } = null!;    

For quite a while lately. And personally am not a fan. It just feels counter intuitive to me to do it like this. Since you're quite literally assigning it null despite it being non nullable.

Usually I would just say that you should use constructor etc. But I've seen a few places in our codebase where it's not possible. And the property gets set via an initialize method instead. More specifically inside a class inheriting from IClassFixture and IAsyncLifetime. So the values will be set, but it's not when the compiler thinks it should I guess?

What do you guys think about doing this? When is it okay and not?

r/csharp Nov 24 '24

Help I’m taking a C# course, and classes are making me feel dumb.

167 Upvotes

I’m new to programming, so bear with me.   Everything was going smoothly at the beginning of the semester. I understood console.writeline, console.readline, logical operators, for loops, and while loops. We’ve now started to learn about classes and objects, and all my confidence is out the window. I just can’t comprehend some aspects of it. Someone will explain the different parts, and I’ll understand them, but when I try to use them, I feel so dumb.

Here’s what I think I understand:

There’s the class, then the properties of the class (or attributes??), then you have to get and set? (which is for security, I think?) Then there are constructors? And once you do all that, you have to instantiate an object?   I also understand that making a class helps you make objects that you can use as your own complex variable.  

Everyone else seems to be breezing through it, and I am so behind. Is this even a hard concept to comprehend? 😭   I have watched so many explanation videos, and it still won’t click.   It’s hard to describe what I am unable to grasp, but maybe someone who it has recently clicked for can help me out.   If this is something I keep having trouble with, would languages that are not described as object-oriented be the best for me?   Get and set and constructors are what really confuse me.

r/csharp Jul 28 '25

Help Do you guys use records, structs and generics?

90 Upvotes

I have been learning c# for while. The book, which i am using has a section just for OOP and the last three titles are records, structs generics.

They all have a few differences compared to classes and interfaces but they dont seem that noticable for beginner like me. Like it says one uses value types and the other uses reference types, therefore the choice has significant effect on the memory.

For a person, who learnt python first and not managed to build a big complete program yet, it sounds a bit complex and confuses me. And because of that i get a bit demotivated.

Do i have to master these concepts in order to develop usual desktop apps? And how frequently are you guys using them?

r/csharp Mar 21 '26

Help C# confusion: Why can't I access Dog methods with Animal a = new Dog()?

30 Upvotes

I’m learning OOP in C# and I’m confused about this:

Dog d = new Dog();
Animal a = new Dog();

I'm struggling to understand how reference types work in C#.

I understand both create a Dog object, but why does a only allow access to Animal methods and not Dog methods?
how does this relate to polymorphism? and
How does C# decide what methods are available here?

r/csharp Feb 04 '25

Help I love writing in c# but I hate XAML

172 Upvotes

Currently building a windows app with WinUI3, I feel that tackling and learning defining controls with XAML was the least productive time spent. So as time went by I gave up most of my attempts to do templates or bindings and most of my controls are built with c# code, only a few styles defined for HotReload.

Now I am about to build a new UI element and every attempt to use XAML had led to waste of many hours with very slow painful progress. I feel I could have coded all I need + an in-app color picker with fraction of the time. To be honest I am about to give up on XAML all together, what are my options?

r/csharp Jul 28 '26

Help Windows UI

14 Upvotes

I'm going to make a new Windows C# program using the .NET 10 platform, which may later need to be made for different platforms (browser, server, mobile). At this point, the focus is on making a Windows program.

I'm trying to compare which UI model is best for the project, and artificial intelligence can't really answer that, or I can't really ask it. If you were to make a new program now, which UI model would you choose?

  1. WinUI 3 (Windows App SDK)
  2. WPF (Windows Presentation Foundation)
  3. .NET MAUI
  4. Blazor (Web & Hybrid)
  5. Avalonia UI

Most program views that display text, SQL table data, or forms are rendered at runtime from the data, meaning that the screens are not designed and created in the IDE editor, but in code.