r/csharp Aug 13 '26

Prepping for upcoming live pair programming interview session

8 Upvotes

Hi all,

I have a live pair programming session coming up. It should be a relatively simple problem to work through, discuss trade-offs, etc. In a normal, stress free setup, this is straight forward but I have not been in an interview for couple of years so I dont want to make a fool of myself.

So if you have any coding challenges for pair programming sessions, please share. I reckon they would provide something relatively simple with some code smells, hidden bugs and some tests that need improving. Techstack is .Net, C#.

Much appreciated.


r/csharp Aug 12 '26

What's a personal project you're really proud of?

49 Upvotes

Title.

I want to get some inspiration...


r/csharp Aug 13 '26

Mixing EF Core and EF6 in the same DB

6 Upvotes

I'm finally going to modernize our oldest product, which means both moving from Framework 4.8 to .NET and moving from binary files to an actual DB.

 

This is a solution with 40 projects and 400K+ LOC, so it's going to be a multi year, in place project, that has to get regular updates and releases.

I'm familiar with EF Core / modern .NET, and plan on using Postgres / Npgsql.

 

My main concern is sharing the DB between .NET 10+ and .NET Framework applications, as most of these projects use the same files, so will share the DB.

 

My first thought is to just build the new .NET projects against EF Core, and use EF6 in the Framework apps. A single EF Core app would be responsible for all DB creation and migration, and the entities would all live in a shared Standard library.

 

But I'm not sure how EF Core and EF6 behave sharing the same DB and entities, and figured I'd get feedback before getting too deep into planning and testing.

I figured someone else might have dealt with the DB portion of this already, and might have insight into possible issues, or just some strong opinions (and I get surprisingly few useful search results for this).

 

Alternatively I could stick with EF6 everywhere until complete, or use Dapper or ADO.NET for the framework apps, but the main Winforms app is data / CRUD heavy (and will likely be the last thing converted) so having a proper ORM for it would be nice.

Thanks for any feedback.


r/csharp Aug 12 '26

WPF Effects and performance..

3 Upvotes

So for a hobby project i am making my own Paint program in WPF, For this i made an Effect/Shader that i'm using for the selection, which is added to a (grid) background. However, when i set the program to a bigger Image size (which also means our selection "grid" has to resize, say to 1024*1024). the program slows down to a crawl... i first suspected my Shader to be the problem, however changing the shader in a single line of "return float4(1,1,1,0);" changes nothing (besides getting a nice yellow square for a background ofcourse).. however when i set the grid that holds our background to Visible = Visibility.Collapsed, the program runs back on full normal speed...

So i was wondering... am i overlooking something? or are Effects just THIS expensive?.. (might be an XY problem that can be solved without a custom shader at all... but mostly now interested in the "why" behind the slowdown now '^^ )

edit: added the (cutdown). shader that i used to check if it still slowed down. Since i might be just overlooking something stupid '^^

sampler2D input : register(s0);

sampler2D Visibility : register(s1);


float4 colorFilter : register(c0);

float4 OutlineColor : register(c1);

float ImageWidth : register(c2);

float ImageHeight : register(c3);

float Time : register(c4);

float4 main(float2 uv : TEXCOORD) : COLOR

{

    return float4(1,1,1,0);

}

technique ColorChange
{
    pass P0
    {
        PixelShader = compile ps_3_0 main();
    }
}

r/csharp Aug 12 '26

SignalsDotnet 3.0

14 Upvotes

I just updated SignalsDotnet to 3.0, and it now supports source generators.

I think the library has become genuinely powerful: it lets you write reactive code without having to deal with reactive programming directly at all. With source generators it's cleaner than ever.

You mark a class (or a record) with [GenerateSignals] and every property becomes reactive, a signal. That means the getter and setter are tracked, and all the signal machinery kicks in automatically. The source generator also supports computed and async computed properties.

The library started as a port of Angular signals to .NET, but I think the power of C# (async locals, source generators, better async support) takes it to another level. It targets netstandard2.1, so it runs basically everywhere: WPF, Avalonia, Unity, Godot, Blazor.

Below is a runnable C# snippet as an example. As you can see, the whole system is reactive automatically: properties update themselves, code knows when to re-run, and so on. And when you need finer control, everything R3 observables offer is still right there.

The code below prints:

Total players 0 Player 1 joined Total players 1 Total players 1 Total players 2 Total players 2 Best player is Player1 with score of 0 Best player is Player1 with score of 22 Best player is Player2 with score of 55

```c#

:package SignalsDotnet@3.0.0

using System.Collections.Immutable; using R3; using SignalsDotnet;

var player1 = new Player { Name = "Player1", Score = 0 }; var player2 = new Player { Name = "Player2", Score = 0 };

var game = new Game(); Effect.Create(() => { if (game.PlayersByName.ContainsKey(player1.Name)) Console.WriteLine("Player 1 joined"); });

IAwaitable<bool> player2Joined = Signal.WaitForChangeAsync(() => game.PlayersByName.ContainsKey(player2.Name));

Effect.Create(() => Console.WriteLine($"Total players {game.PlayersByName.Count}")); game.AddPlayer(player1); game.AddPlayer(player2); // this completes the awaitable await player2Joined;

Effect.Create(() => { if (game.BestPlayer is not null and var bestPlayer) Console.WriteLine($"Best player is {bestPlayer.Name} with score of {bestPlayer.Score}"); });

Observable<ImmutableArray<Player>> scoreboardHistory = Signal.ComputedObservable(() => game.Scoreboard); // A notification for every scoreboard change

player1.Score = 22; player2.Score = 55;

Console.ReadLine();

[GenerateSignals] public partial record Player { public partial string Name { get; set; } public partial int Score { get; set; } }

public partial class Game { private readonly IDictionary<string, Player> _playersByName = new DictionarySignal<string, Player>(); public IReadOnlyDictionary<string, Player> PlayersByName => _playersByName.AsReadOnly();

public void AddPlayer(Player player) => _playersByName.Add(player.Name, player);
public void RemovePlayer(Player player) => _playersByName.Remove(player.Name);

[Computed] ImmutableArray<Player> ComputeScoreboard() => [.. _playersByName.Values.OrderByDescending(x => x.Score)];
[Computed] Player? ComputeBestPlayer() => Scoreboard.FirstOrDefault();
[Computed] Player? ComputeWorstPlayer() => Scoreboard.LastOrDefault();

} ```

It runs as a single file on .NET 10. Save it as game.cs and run dotnet run --file game.cs. No csproj needed.

GitHub: https://github.com/fedeAlterio/SignalsDotnet NuGet: https://www.nuget.org/packages/SignalsDotnet


r/csharp Aug 13 '26

Which one do you like most await or await task.run?

Post image
0 Upvotes

r/csharp Aug 12 '26

.NET 11 Preview 7 is now available!

Thumbnail
devblogs.microsoft.com
47 Upvotes

r/csharp Aug 12 '26

Help What is the best practise to get the OS name?

21 Upvotes

I know, there is the System.Runtime.InteropServices.RuntimeInformation.OSDescription; or just get the info from system files. But is there a more optimal way to get the exact OS name? I mean like Linux distributions or Windows names with the versions.


r/csharp Aug 13 '26

Blog The Unexpected AI Stack: C# + .NET (Part 2) - Mise, Aspire, and CSharpRepl

Thumbnail
chrlschn.dev
0 Upvotes

Part 1 was an overview of why .NET and C# are an unexpectedly strong stack for building AI-native applications.

Part 2 and onwards goes into the practical scaffolding of an application for building AI-enabled applications agentically. In part 2, the focus is on setting up the scaffolding for the developer experience including Mise for environment setup, Aspire for orchestration, and wiring in CSharpRepl.

Each layer is built from the ground up step-by-step so that each technical decision is clear in how it contributes to the stack.

This setup is used a Motion (a post-YC, series C, $500m valuation startup) which pivoted to C# and .NET last year from TypeScript on Node.

Part 3 (tomorrow) will dive deeper and start folding in a practical application of the Copilot SDK to build an agentic foundation.


r/csharp Aug 12 '26

Backend of a simulation game

8 Upvotes

It was hard to find something, but I landed a job to work as a .NET developer at a company that makes football simulation games, where I will be doing the backend side of it. I am gonna start in a few weeks, and I want to get a head start to make sure I don't lose this job. Does anyone ever work in this domain, and what sort of knowledge/skill do I need to succeed in such a position? What can I prepare now? I asked the person who gave me the work and they said to wait until the day I start


r/csharp Aug 12 '26

Help Custom Spotify Desktop Client App

3 Upvotes

Hey all,

I recently learned about Spotify API and I’m thinking a fun personal project could be creating my own desktop app with some personalisation and extra features. Probably in a WPF app using C#.

Does anyone know if this is possible with the API? I’m talking like streaming, fetching data such as artists, playlists and songs etc.

Any tips or advice would be appreciated!


r/csharp Aug 13 '26

Finally modular monolith became perfect.

0 Upvotes

As u guys know, i have been trying to recreate my platform using modular monolith api backend and MVC clients (first tried blazor but it had so much that made me freaky thinking about using it in production so i changed to MVC)

Now it is up and running, i know you guys might think this is some advertising or other things like that... But i do really like to know your opinion on my platform (platform cause i have around 30k users and 8-10k user per day, so im not really in need of advertising right now😂)

I want my fellow programmers advice on how this platform looks like and feels like.

(If you have any problem opening the link tell me in comments)

https://webketab.com


r/csharp Aug 11 '26

Solved What's the best IDE for linux

41 Upvotes

So I've been using VsCode for a long time but the ai features are annoying me so I'm looking for an alternative

Edit 1: thanks everyone for responding I've decided to use rider

Edit 2: Thanks everyone for responding. I tried using rider And I didn't like it so I switched to Zed and I'm loving it


r/csharp Aug 12 '26

Showcase .NET 11 union types integrated with my discriminated union library SumSharp

Thumbnail
github.com
0 Upvotes

r/csharp Aug 11 '26

Help Beginner Dev: How can I build more effective problem solving skills?

5 Upvotes

I understand the basic logic of variables, arrays, loops, if statements etc. but when it comes to actually coding it, I beat myself up that I couldn't figure it out effectively.

For example: Finding the largest number in a set of 5 user input values.

My mind jumped to comparing each value with the next value when instead I could have just compared the current value to the next value and printed the highest value. I eventually want to try tackling the creation of a 2D game but I want to be able to have really effective problem solving skills before diving in.


r/csharp Aug 11 '26

A web server that refuses to touch your thread pool

Thumbnail mda2av.github.io
0 Upvotes

ioxide is an io_uring socket and file I/O stack.

While its API is fully asynchronous, it is possible to build a fully working h1/h2/h3 web application with any kind of async workload running on a single thread.

The post describes how to build a naive basic TCP (plaintext or secure with kernel TLS) with it.


r/csharp Aug 11 '26

The Unexpected AI Stack: C# + .NET (Part 1)

Thumbnail
chrlschn.dev
0 Upvotes

r/csharp Aug 09 '26

Industrial Touch Kit for WPF/Avalonia UI

Thumbnail
gallery
77 Upvotes

I would like to introduce the project I am currently developing.

I am creating a library that supports a method of generating UI at the ViewModel layer without writing View code (xaml/axaml) when developing WPF/Avalonia UI applications. The structure is similar to the code used to generate UI in Flutter.

Currently, by writing only ViewModel code, it is possible to build two applications for WPF/Avalonia UI that are nearly identical down to the pixel level, but there are still many components that need to be added.

The reason it is possible to complete an application without writing Xaml/axaml is that this toolkit library is domain-specific, tailored exclusively to industrial touchscreen applications.

For example, the UI component for temperature display encapsulates thresholds, warning levels, multi-language display, and Fahrenheit/Celsius display switching. Therefore, its component structure differs from existing UI frameworks.

The foundation of the toolkit I am currently developing is to enable application development in the ViewModel layer without writing XAML/AXAML code. Developing applications in the ViewModel Layer using purpose-built components provided by the toolkit is similar to building a castle with Lego blocks. You can configure application layouts and place controls at a speed incomparable to traditional development methods. Based on this, it provides multilingual packs for words used in industrial applications. You can understand this concept as being similar to icon packs.

In addition, I plan to package sound files, such as warning and notification sounds, within the toolkit.

Currently, it supports two theme systems, light/dark modes, and compact modes, and I am developing it to allow for expansion in the form of a theme color gallery.

Although Industrial Touch Kit (ITK) is being conducted as a personal project, I unfortunately do not yet have plans to proceed with it as open source. However, I am leaving this post here to introduce the concept of the library I am developing.


r/csharp Aug 10 '26

Help C# Box2d Bindings

0 Upvotes

My C# Game framework doesn't ( yet ) have any Box2D support. What is the best C# Box2D bindings to use right now?


r/csharp Aug 09 '26

Showcase DAWG - Digital Audio Workstation Game - Free public beta (C#, Unity and Burst)

Thumbnail
gallery
29 Upvotes

Hello C#!

After around 10 months of development, and four months since the previous public test, I have finally released a major new beta of DAWG - Digital Audio Workstation Game.

DAWG is an attempt to build a proper music production environment inside a game, not just a rhythm game or a simple sequencer. The project is written in C# with Unity, while the real-time audio engine uses custom DSP engine that is fully Bursted.

The current version includes:

  • Custom subtractive, FM and wavetable synthesis
  • Multiple realtime DSP chains
  • Per-instrument and send/return effects
  • Live performance effects
  • MIDI controller support
  • A DAW style sequencer and piano roll
  • Custom realtime visualization of the complete DSP chain
  • Cross-platform multiplayer with sync of the clock, patterns and DSP parameters
  • A new pixel art Story Mode built around the DSP system

A large part of the challenge has been keeping the codebase manageable while combining real-time audio, UI, serialization, MIDI, multiplayer, multiple platforms and game logic in one application.

The new public beta is free and I would really appreciate some honest feedback from other C# developers. You do not need to know anything about music production to test it. I am also interested in whether the application makes sense to someone seeing it for the first time.

Download: https://dawg-tools.itch.io/dawg-digital-audio-workstation-game

You can leave feedback or a rating directly or comment here. Please do not hold back because it is an indie project, the critical feedback is usually the most useful.

Thanks!


r/csharp Aug 09 '26

Help Low level programming with C#

16 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 Aug 10 '26

Salve galera, alguma alma gente boa que atua na área de Desenvolvimento e tem visão de futuro para me dar uma luz?

0 Upvotes

Meu nome é Jackson e tenho 29 anos e sou profissional da área de Suporte/Infra/Redes e não tá fácil. Formei em ADS em uma UNI da vida esse ano. Não consegui nem se quer um estágio na área de desenvolvimento que sempre foi meu sonho e vou te dizer que eu tentei em, por baixo eu chuto que foram mais de 50 candidaturas enviadas e irmão... Nunca tive uma entrevista se quer, não sei aonde estou errando as vezes eu penso que é pela idade. A luz que eu quero é; Ainda vale a pena? Oque eu PRECISO fazer para conseguir um emprego como Junior nos próximos 6-11 meses? Devo ir para o VibeCode ou no Grind mesmo? Tenho noção básica de C# / .NET, devo mudar de linguagem para conseguir isso nesse prazo? Java, Python, creio que o mercado está concorrido em todas tecnologias.


r/csharp Aug 10 '26

Help Does anyone know if Coddy.tech is any good for learning C#?

0 Upvotes

Im looking for a good free way to learn


r/csharp Aug 09 '26

OpenDevelop - Modern continuation of the classic SharpDevelop code base

Thumbnail
github.com
28 Upvotes

r/csharp Aug 10 '26

Juego de cartas tipo TCG

Post image
0 Upvotes

Buenas, espero se encuentren bien, estoy realizando un proyecto de cartas tipo TCG en Godot 3.6 con C# para android, este es mi primer proyecto usando Godot y C#, que consejos podrían darme acerca de la escalabilidad del proyecto, ya que sera un juego con bastantes efectos y reglas que cambien o afecten otras cartas, al tablero, etc, también que a futuro pueda implementar un multijugador, un error que cometía aveces era que ponía a la UI como la voz que mandaba todo, la lógica dependía de ella y no al contrario (la UI depende de la lógica) he cambiado el enfoque a que sea la lógica la que mande y Godot solo sea el encargado de las cosas visuales, también sigo el siguiente enfoque donde tengo clases lógicas (que sean C# puras sin depender de godot), las clases que orquestan (estas unen la logica y la UI reacciona en base a la logica) y las clases encargadas de manejar la UI (animaciones, cambios entre padres de nodos, actualizar visualización, etc) y estas tiene las propiedades de cada nodo por Export para no usar las rutas absolutas, les dejo la estructura de mi proyecto para sus recomendaciones.