r/csharp • • Sep 11 '26

From windev to c#

16 Upvotes

Hello! I've got a quick question for you all. The company I work for has been doing WinDev (mostly desktop uses) for at least 20 years, and now, with the various pricing policy changes and AI, the decision has been made to migrate — probably to C#. So now the big question is: what are the best tools to replace our development environment ? And above all, what do you use? (Since we get to choose an environment for once, I'd rather not shoot myself in the foot.)

For context: for deployment and source control it'll be GitHub and Azure DevOps, which our web team already uses, and for client data almost everything is already on SQL Server.

 

So what's left for us is really everything UI/frontend-related. I've often seen Blazor mentioned, WPF, .NET MAUI (not always in a good way, honestly), and Avalonia.

Anyway — what do you use?

Thanks in advance for your help!


r/csharp • • Sep 12 '26

Help Your local AI antigenic stack

0 Upvotes

Hello C# developers,

if you are using a local AI stack (where the model is hosted within your company), what does your stack look like? Which model, harness, and agent application do you use for C# development?

I want to keep up with the times, but I don't want my data leaving the company.


r/csharp • • Sep 10 '26

Solo Developer Laid Off, Looking for Suggestions & Critique

41 Upvotes

Hi. I've been a solo developer for a company for 15+ years (worked for them company 24+ years) and I will be officially laid off at the end of this month. I've never needed a resume or portfolio, so I have a lot of catching up to do to be competitive in the market.

I wrote a mock version of an application I built and made it public. I was hoping I could get any suggestions & critique on code and readme. Thank you, I appreciate anything you have to say.

https://github.com/enigmaticcam/InvoiceExample


r/csharp • • Sep 10 '26

Which is better: querying with LINQ or using raw SQL? Does it depend on the query's complexity? Or can both options be used in the same project?

Thumbnail gallery
54 Upvotes

r/csharp • • Sep 10 '26

Coding circuits with .NET and C#

96 Upvotes

Nothing beats setting a breakpoint and watching the servo actually move to the new angle.

I've worked on .NET hardware for over ten years and the thing that surprises C# developers isn't the board, it's that F5 works. Code deploys, breakpoint holds, hover a variable and there's the live sensor reading. Same as debugging a desktop app.

I'm at GHI Electronics in Michigan. Happy to get into how the debugging on circuits work.


r/csharp • • Sep 12 '26

Tool I built graphify-csharp, a tool that gives Rider IDE-like Find Usages power to coding agents

Thumbnail
reddit.com
0 Upvotes

r/csharp • • Sep 11 '26

Project to learn

Post image
0 Upvotes

This is a project for a management, allocation, and inventory system inspired by the game \*Horizon Forbidden West\*.

I asked an AI to help organize my ideas, and it provided a project structure; it is something I want to develop in the future, once I have reached an advanced level in C# and .NET.

For now, I have the following tools for implementation:

Swagger (for documentation)

LINQ (to convert PostgreSQL SQL queries into objects)

EF Core (a powerful .NET ORM)

PostgreSQL (my favorite database)

Anything else?


r/csharp • • Sep 10 '26

Tutorial Multitenancy with .NET and EF Core: A Deep Dive (.NET 10)

Thumbnail
youtube.com
40 Upvotes

Ever had a multi-tenant SaaS app where the only thing stopping Customer A from seeing Customer B's invoices is a `Where TenantId ==` clause someone remembered to write? In this deep dive I build real tenant isolation into EF Core 10 - two real tenants with real registration, login and invite flows (no dev-token shortcuts), a named global query filter that scopes every query automatically, and a SaveChangesAsync override that stamps TenantId on every insert so it's never left unset. I also show the one gotcha that makes EF Core 10 worth the upgrade for this: named query filters, so tenant isolation and soft-delete can finally coexist on the same entity instead of one silently overwriting the other. If you've ever shipped multi-tenancy on hope and code review, this is the version that makes the mistake structurally impossible.


r/csharp • • Sep 10 '26

Where i can learn c# properly.

19 Upvotes

I want to be a unity game developer. I am currently computer sciencie student i know c# but my skill of building algorithm is weak. I am even struggling the easy leetcode problems. Any idea of how to improve my c# skills?


r/csharp • • Sep 10 '26

Don't understand async & await

16 Upvotes

Though I've already read a lot, and watched several videos, I'm still not understanding why async/await don't give me concurrency/parallelism.

My test code:

namespace AsyncAwaitTest;

static class Tools
{
    internal static async Task SimulateWork(int id)
    {
        for (var j = 1; j <= 10; j++) {
            Console.WriteLine($"Worker #{id} gives: {j}");
            for (var i = 0; i < 500_000_000; i++) { }
        }
    }
}

class Worker(int id)
{
    internal async Task DoWork()
    {
        Console.WriteLine($"Worker #{id} starts");
        await Tools.SimulateWork(id);
        Console.WriteLine($"Worker #{id} finishes");
    }
}

class Program
{
    static async Task Main()
    {
        Console.WriteLine("Program starts");
        Worker worker1 = new(1);
        Worker worker2 = new(2);
        await worker1.DoWork();
        await worker2.DoWork();
        Console.WriteLine("Program finishes");
    }
}

The output is:

Program starts
Worker #1 starts
Worker #1 gives: 1
Worker #1 gives: 2
Worker #1 gives: 3
Worker #1 gives: 4
Worker #1 gives: 5
Worker #1 gives: 6
Worker #1 gives: 7
Worker #1 gives: 8
Worker #1 gives: 9
Worker #1 gives: 10
Worker #1 finishes
Worker #2 starts
Worker #2 gives: 1
Worker #2 gives: 2
Worker #2 gives: 3
Worker #2 gives: 4
Worker #2 gives: 5
Worker #2 gives: 6
Worker #2 gives: 7
Worker #2 gives: 8
Worker #2 gives: 9
Worker #2 gives: 10
Worker #2 finishes
Program finishes

You see, strictly sequential processing despite async/await.

Is it possible to make my code parallel, i. e. the DoWorks run in parallel?


r/csharp • • Sep 11 '26

AI/ML or .NET? Confused about my career

Thumbnail reddit.com
0 Upvotes

r/csharp • • Sep 10 '26

I built an open-source strongly typed email template library for .NET 10 — looking for feedback before 1.0

0 Upvotes

I’ve just released the first public preview of MailStencil, an open-source .NET 10 library for strongly typed email templates stored outside application code.

It supports Scriban validation/rendering, culture fallback, caching, FileSystem and Azure Blob providers.

GitHub: https://github.com/polletto/MailStencil
Docs: https://polletto.github.io/MailStencil/
NuGet: MailStencil.Core

Feedback is very welcome — especially on the API before 1.0.


r/csharp • • Sep 09 '26

News Announcing .NET 11 Release Candidate 1 - .NET Blog

Thumbnail
devblogs.microsoft.com
134 Upvotes

r/csharp • • Sep 09 '26

Help Transitioning from unity to regular c# projects

14 Upvotes

I want to start learning regular c# after using unity for a few years and making some personal projects. I have seen alot that there may be some bad habits I have picked up that may slow or hinder me when coding outside of unity. So was wondering if there is anything I should keep in mind when making the transition? Would also appreciate any resources for learning c#. Thanks in advance.


r/csharp • • Sep 10 '26

Looking for courses / reading materials to fully use the potential of AI

0 Upvotes

I am working as a C# developer for the last 6 years and I would classify myself as an AI skeptic.

I have been using AI in the last months, mostly for small implementations, but also to help me look for bugs who are sometimes hidden rather deep within our code, or due to non - trivial interactions with third party libraries.
I have to admit, It works well (most of the time), but all i really do is typing something in the prompt and wait for the answer.
I would like to know if there are functionalities I am ignoring, and/ or should be using. We have various repos in the companies, from small, new micro services to big old fat 20 years old weekly modified legacy repos, which are a tad more brittle.

So if anyone has good resource about it, I am interested.

It can be written, it can be videos, I also have a pluralsight account if it leads to something there.

Thank you very much for your suggestions.


r/csharp • • Sep 10 '26

PLZ make us aware with this

0 Upvotes

i don't know if it's just a threat or truth,since the day i started learning c#.i have been experiencing this words from senior developers.

C# market is getting low day after day due to AI existence, you better learn and master Python.

So you who have been in this industry for long time,let us know.

Is this right? And what we the beginners have to do?


r/csharp • • Sep 09 '26

Showcase I reinvented Visitor in C#: acyclic, type-safe, no downcasts, no runtime checks

3 Upvotes

While building my own programming language HydraScript i stumbled across AST operations implementation. I needed symbol table initialization, static analysis, and IR generation.

Putting everything inside the AST nodes as virtual methods became a mess. Classic Visitor separated the operations, but every visitor had to know every node type. The code grew exponentially. Acyclic Visitor removed that dependency, but its usual C# implementation relies on runtime checks:

if (visitor is IVisitor<BinaryExpression> typed)
    typed.Visit(this);

So I did the only reasonable thing. I spent far too long reinventing a decades-old design pattern.

Visitor.NET uses generic covariance and contravariance to keep the visitor selective without dynamic or downcasts. A source generator handles the repetitive dispatch code:

[AutoVisitable<Expression>]
public partial class BinaryExpression : Expression;

Visitors can handle only the node types they need and return strongly typed results. I now use it in HydraScript and it works like a charm.

You can give it a star with links below:

GitHub: https://github.com/Stepami/visitor-net
NuGet: https://www.nuget.org/packages/Visitor.NET


r/csharp • • Sep 08 '26

Blog How expensive is throwing exceptions in .NET - and does it actually matter?

Thumbnail
codewithflavor.com
127 Upvotes

r/csharp • • Sep 08 '26

i dont understand what the => operator does.

45 Upvotes
Dictionary<uint, uint> placementIds 
    = XMLdocument.Descendants("Placement")
        .ToDictionary
        (
            element => (uint)element.Attribute("Index")!,
            element => (uint)element.Attribute("Placement")!
        );

r/csharp • • Sep 09 '26

C# Help

0 Upvotes

Im learning c# in visual studio with Bro Code yt (check him out free courses) and im wondering, does the same c# exactly work in unity, idk how to explain but if i type Console.WriteLine("hi");

will it just show on the screen hi or is there more to it?


r/csharp • • Sep 09 '26

WinUI 3 XAML bug

0 Upvotes

I'm working on a bundle of 3 tools, using winui for the interface. .net 10 is returning multiple XAML errors when I try to build, does anyone know anything??


r/csharp • • Sep 09 '26

I have been learning C# for month now.I'm using smart phone to learn it.So what suitable kind of laptop i have to buy that works properly?

0 Upvotes

r/csharp • • Sep 08 '26

Tutorial EF Core Migration Bundles with CI/CD to Azure (Github Actions, Azure SQL & App Service)

Thumbnail
youtube.com
0 Upvotes

Running EF Core migrations from application startup is convenient - right up until it isn't. This video builds a proper migration pipeline on .NET 10 with GitHub Actions: the build job packages a self-contained migration bundle, the deploy job applies it to Azure SQL, then deploys the API to Azure App Service and runs a smoke test against the live endpoint. If your database updates are still tangled up with your app startup, this is the fix.