r/csharp • • 15d ago

Discussion Come discuss your side projects! [October 2026]

13 Upvotes

Hello everyone!

This is the monthly thread for sharing and discussing side-projects created by /r/csharp's community.

Feel free to create standalone threads for your side-projects if you so desire. This thread's goal is simply to spark discussion within our community that otherwise would not exist.

Please do check out newer posts and comment on others' projects.


Previous threads here.


r/csharp • • 15d ago

C# Job Fair! [October 2026]

7 Upvotes

Hello everyone!

This is a monthly thread for posting jobs, internships, freelancing, or your own qualifications looking for a job! Basically it's a "Hiring" and "For Hire" thread.

If you're looking for other hiring resources, check out /r/forhire and the information available on their sidebar.

  • Rule 1 is not enforced in this thread.

  • Do not any post personally identifying information; don't accidentally dox yourself!

  • Under no circumstances are there to be solicitations for anything that might fall under Rule 2: no malicious software, piracy-related, or generally harmful development.


r/csharp • • 4h ago

Discussion C# once again the fastest web framework

Post image
149 Upvotes

With all those discussions about Microsoft porting stuff to Rust, it’s nice to see that C# does not need to hide when it comes to performance. There has been quite a lot of movement at the top of the leaderboard over the last few weeks (two weeks ago, first place was around 6850), so I’m interested to see how this race continues. This is the non-tuned section, so frameworks need to be stable and production-ready. Interestingly enough, the C# one is the most high-level of the leading frameworks, API-wise.


r/csharp • • 13m ago

Help Verify the correctness of a the data inside a junction table

• Upvotes

I want to verify the correctness of the data inside a junction table.

I'm showing a minimal example here:

Products:

| Id | EnglishName |
|----|-------------|
| 1  | Drill 4       |
| 2  | Light Switch 48|

Suppliers:

| Id | EnglishName |
|----|-------------|
| 1  | Bosch       |
| 2  | Ingco       |
| 3  | Yato        |

Excel2:

| Product             | Supplier               |
|----------------------|-----------------------|
| Drill 4              | Bosch                 |
| Light Switch 48      | Ingco                 |
| Cable 12             | Bosch                 |
| Hammer 14            | Yato                  |

ProductsSuppliers:

| ProductId | SupplierId |
|-----------|------------|
| 1         | 1          |
| 1         | 3          |
| 2         | 1          |

Excel2JoinProductsJoinSuppliers :

| Product           | Supplier  | ProductId | SupplierId |
|-----------------|----------|-----------|------------|
| Drill 4         | Bosch    | 1         | 1          |
| Drill 4         | Yato     | 1         | 3          |
| Light Switch 48 | Bosch    | 2         | 1          |

A C# code was used to insert data into Products , Suppliers , and ProductsSuppliers .

The data for Excel2 was imported into Sql Server manually using the "Import Data" wizard.

As the name suggest, Excel2JoinProductsJoinSuppliers is the result of join operation.

ProductsSuppliers is the junction table that I'm concerned about, the data inside it is correct in this example because each productId is mapped to the correct value of SupplierId and vice versa, but the actual table contains much more data, let alone the fact that there are other junction tables that should be verified.

Is there a set-based approach that can automate the process of verifying the data for junction table ?

EDIT:

I created this stored procedure:

CREATE PROCEDURE verify_junction_table_data_using_dynamincSQl 

    @junctionTableName varchar(100), 
    @lookupTableName varchar(100), 
    @leftColumnNameInExcel varchar(100), 
    @rightColumnNameInExcel varchar(100), 
    @leftColumnNameInJunctionTable varchar(100), 
    @rightColumnNameInJunctionTable varchar(100), 
    @parent1Name varchar(100), 
    @parent2Name varchar(100) 

AS 

BEGIN 

DECLARE @sql_query NVARCHAR(MAX);
SET @sql_query = 
N'


                SELECT JT.'+QUOTENAME(@leftColumnNameInJunctionTable)+',
                       JT.'+QUOTENAME(@rightColumnNameInJunctionTable)+'
                FROM '+QUOTENAME(@junctionTableName)+' JT
                EXCEPT

                SELECT 
                DISTINCT

                    parent1.Id AS ' + QUOTENAME(@leftColumnNameInJunctionTable) + ',
                    parent2.Id AS ' + QUOTENAME(@rightColumnNameInJunctionTable) + '

                FROM '+ QUOTENAME(@lookupTableName) +' AS LookupTable
                INNER JOIN ' + QUOTENAME(@parent1Name) + '  AS parent1 ON LookupTable.' + QUOTENAME(@leftColumnNameInExcel) + ' = parent1.EnglishName
                INNER JOIN ' + QUOTENAME(@parent2Name) + ' AS parent2 ON LookupTable.' + QUOTENAME(@rightColumnNameInExcel) + ' = parent2.EnglishName


    ';

EXEC sp_executesql @sql_query;

END

GO

I have 20 junction tables, so I need to execute this procedure 20 times , but I do not want to do it manually, is there a way to automate this ?


r/csharp • • 1h ago

Solved c# struct padding

• Upvotes

I'm new to c# and I'm learning it just now to switch from Godot to Stride so I'm interested in Data Oriented Design. I was just now experimenting with structs with a silly example and was focused on struct padding; the string should be 8 bytes while the enum is 1 byte so i expected not more than 1 or 3 byte of padding, but the sum ends up being 16 no matter the order... does it always have to allign with the biggest field? how does this work?

using System.Runtime.InteropServices;


[StructLayout(LayoutKind.Explicit)]
struct Entity {
    public enum Race : byte { ALIEN, HUMAN };
    static private int _max_rand_num = 9999;
    static private string[][] _possibleNames = {
        new string[]{"Vorp", "Zeep", "Bizr", "Zub", "Wobt"},    // alien names
        new string[]{"Carl", "Greta", "Seb", "Xiang", "Sierra"} // human names
    };

    [FieldOffset(0)] public readonly string name;
    [FieldOffset(8)] public readonly Race race;

    public Entity()
    {
        Random rand = new Random();
        race = (Race)rand.Next(Enum.GetValues(typeof(Race)).Length);
        string[] race_names = _possibleNames[(int)race];
        name = race_names[rand.Next(0, race_names.Length)] + rand.Next(_max_rand_num);
    }

    public override string ToString()
    {
        return $"Race: {race}, Name: {name}";
    }
}


class Program {
    public static unsafe void Main(string[] args)
    {
        Entity rand_entity = new Entity();
        Console.WriteLine(
            $"{rand_entity}, string size = {sizeof(string*)}, enum size = {sizeof(Entity.Race)}, together = {sizeof(Entity)}");
    }
}

r/csharp • • 15h ago

Fun Average C# beginner day

6 Upvotes

r/csharp • • 2h ago

Blog Async in F#, C# and TypeScript, and where task { } in Fable stands as of 5.21

Thumbnail
0 Upvotes

r/csharp • • 15h ago

Beginner question about creating new variables at runtime?

0 Upvotes

Hello,im creating a map terrain generator on the terminal with visual studio. In this generator, based on a random number, it decides how many mountains the map will have, my question was, how do I create more mountain y and x position variables at runtime when the random number is decided? thanks.


r/csharp • • 1d ago

Help Looking for advice (beginner project).

3 Upvotes

Hi everyone!

I'm writing this post to ask for some help from people with more experience in C# and programming logic. Below, you'll find the code I've written for a small C# application. The goal of this project is to create a personal weekly to-do list that helps me keep track of my strengths, weaknesses, and tasks. Unfortunately, I've reached a point where I'm not sure how to proceed, particularly when it comes to implementing a way to save tasks so that they are still available after closing and reopening the program.

For some context:

the idea behind this application is to create a weekly to-do list. When the program starts, the user selects a day of the week and enters three tasks. They can then choose whether to continue or exit the program. The main requirement is that tasks must be saved when the user switches to another day or closes the application. For example, if I enter three tasks for Monday, switch to Tuesday, and then return to Monday, I should be able to see the tasks I entered previously. The same should apply after closing and reopening the program.

I'm still a beginner in programming. I've studied some of the fundamentals, but I know I still have a long way to go.

I'd really appreciate ANY suggestions, explanations, or advice on how to approach this problem or in general. In particular, I'd like to understand what concepts I should study and how I could implement a persistent storage system for my tasks.

I'm also very open to constructive criticism regarding my code, programming logic, or overall approach. I'd like to learn how to solve these problems independently rather than simply copying a solution.

Thanks in advance to anyone willing to help!

Code:

// This program creates a to-do list for every day of the week
// and randomly picks a motivational sentence.

string[] week = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"];

string[] tasks1 = new string[7];
string[] tasks2 = new string[7];
string[] tasks3 = new string[7];

string[,] task = new string[7, 3];

Console.WriteLine("\tTo-Do list program\nPress: Y to start or N to quit!");

var input = Console.ReadKey();

switch (input.Key)
{
    case ConsoleKey.Y:

        Console.Clear();

        Console.WriteLine("Choose the day that you want to view:\n");
        string dayOfWeek = Console.ReadLine();

        bool found = false;

        foreach (string day in week)
        {
            if (day.Trim().ToLower() == dayOfWeek.Trim().ToLower())
            {
                found = true;

                // Find the position of the selected day
                int dayIndex = Array.IndexOf(week, day);

                Console.Clear();

                Console.WriteLine("Point one:");
                string task1 = Console.ReadLine();
                tasks1[dayIndex] = task1;

                Console.WriteLine("Point two:");
                string task2 = Console.ReadLine();
                tasks2[dayIndex] = task2;

                Console.WriteLine("Point three:");
                string task3 = Console.ReadLine();
                tasks3[dayIndex] = task3;

                Console.Clear();

                Console.WriteLine($@"
| Day: {day}

| 1. Task: {tasks1[dayIndex]}
| 2. Task: {tasks2[dayIndex]}
| 3. Task: {tasks3[dayIndex]}
");

                Console.WriteLine("Do you want to see other days? To continue or quit press Y/N:"); 
                Console.ReadKey(); 
                Console.Clear();

                break;
            }
        }

        if (!found)
        {
            Console.Clear();
            Console.WriteLine("Invalid Day inserted");
        }

        break;

    case ConsoleKey.N:
        break;

    default:
        Console.WriteLine("Invalid Key");
        break;
}

r/csharp • • 2d ago

Am I missing something, or is this the ultimate C# paradox

110 Upvotes

Found this in a codebase today:

if (transaction == null)
{
    Debug.WriteLine(
        string.Format("Transaction with num {0} is null", transaction.Num));
}

The code checks whether transaction is null and, if it is, tries to access transaction.Num to log the error.

So if the transaction exists, nothing happens. If it doesn't exist, the logging code crashes.

I've seen enough legacy code to know that even the most questionable-looking code sometimes has an explanation. So, before judging: am I missing something here, or is this exactly what it looks like?


r/csharp • • 15h ago

I built QuickRun, a modern Win+R replacement for Windows 11 using WinUI 3

Thumbnail
gallery
0 Upvotes

Hi everyone,

I've been working on QuickRun, an open-source launcher inspired by the classic Windows Run dialog.

It's built with WinUI 3 and .NET 8 and focuses on providing a modern Windows 11 experience while keeping the simplicity of Win+R.

Current features:

• Built-in calculator

• Automatic desktop app discovery

• Microsoft Store app support

• Command suggestions

• URL launching

• Windows system commands

• Command arguments support

The project is open source and I'd love to get feedback from the Windows community.

GitHub:

https://github.com/GiosuOffice/QuickRun


r/csharp • • 1d ago

Discussion Is it a bad/good practice to inject Interface<ConcreteType> into a class ?

10 Upvotes

If you see something like this :

    public class SomeClass
    {


        private readonly ISomeInterfacer<SomeConcreteType> _x;

        //Code.........
    }

Dependency Inversion :

High-level modules should not import anything from low-level modules. Both should depend on abstractions (e.g., interfaces).

The class above depends on abstraction, which is the ISomeInterfacer<SomeConcreteType>, but even though, there is something concrete inside the <>, which is SomeConcreteType .

Is that considered a violation for Dependency Inversion ?

I know I will hear the magic word : it depends.

please tell me all the cases, when it is good and when it is bad.

Actual code :

using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;

public interface ISourceToDistinationDataSyncronizer<DataSource>
{

    public Task SyncronizeAsync(DataSource dataSource, CancellationToken cancellationToken);

}
[Authorize(Roles = "Admin")]
public class AdminController : Controller
{

    //Reddit question..
    private readonly ISourceToDistinationDataSyncronizer<Stream> _syncronizer;
    public AdminController(

        ISourceToDistinationDataSyncronizer<Stream> syncronizer

    )
    {

        _syncronizer = syncronizer;

    }


    [HttpPost]
    [Route("Admin/Import")]
    public async Task<IActionResult> Import(IFormFile file, CancellationToken cancellationToken)
    {

        if (file.ContentType != "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")
        {
            return BadRequest();
        }

        await _syncronizer.SyncronizeAsync(file.OpenReadStream(), cancellationToken);


        return Ok();

    }

}

r/csharp • • 1d ago

Looking for a small C#/.NET project idea

4 Upvotes

I have a software engineering interview coming up for a C#/.NET role, and part of it will involve discussing the architecture/design of something I’ve built.

I want to build a small project specifically for this so I can know it inside out and use it for design and coding questions, since everything I do in my actual job is simple CRUD requests.

Any suggestions for something not too big, but with enough complexity to discuss interesting architecture decisions?

Thanks


r/csharp • • 2d ago

Discussion C# 15 adds labeled break and continue. Do you use goto today? Would you use this?

115 Upvotes

C# 15 (in preview with .NET 11) lets `break` and `continue` target an outer loop by label:

outer: for (int x = 0; x < xMax; x++)
    {
        for (int y = 0; y < yMax; y++)
        {
            if (ShouldSkipRest(x, y))
                continue outer;

            if (ShouldExitAll(x, y))
                break outer;
        }
}

Until now you needed `goto` or a flag variable for this. Java, Go, Rust, Kotlin and Swift already have it.

Honestly, `goto` never even comes to mind when I write an algorithm. I find it hard to follow, so when I need to leave nested loops I extract a method and `return` instead.

Do you use `goto` in real code? Do you think you'll use labeled break/continue?

https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-15#labeled-break-and-continue


r/csharp • • 1d ago

Help Need help with encoding

0 Upvotes

I am working on a system where the client will give data in UTF-8 encoding, and hence it can contain many special characters.

But then we send data to a legacy system which only accepts data in ISO-8859-9 encoding, which supports limited special characters that can be represented in single byte.

Now if the client sends any special character which is outside the scope of ISO-8859-9 encoding (like the Em dash), how can I deal with with it and send it to the legacy system.

I don't want to replace those characters with anything like space or "?", as it would make the client data as unreadable in some cases.

How can I deal with it. Any suggestions?


r/csharp • • 2d ago

Announcing .NET 11 Release Candidate 2

Thumbnail
devblogs.microsoft.com
31 Upvotes

r/csharp • • 2d ago

C vs C#: racing VLC's Gaussian blur

Thumbnail
martinfinkel.com
38 Upvotes

r/csharp • • 1d ago

Help me with Terrain in my 3d game

0 Upvotes

Recently, I started writing a new 3D game in C#. I’ve already written the collision system, the camera, and the loading of 3D models, and now I’m moving on to the next stage — creating a procedural landscape. I’ve tried many ways to do this, but the result doesn’t satisfy me. I’ve already used Perlin Noise and Simplex Noise, but I couldn’t get what I wanted with them. If anyone knows any methods or libraries for C#, please write them in the comments.

The game will be like Minecraft with different graphics, meshes and some new features.


r/csharp • • 2d ago

Blog Expanding .NET ULID handling with native ASP.NET Core constraints, AOT-friendly JSON converters, and CLI tooling

Thumbnail
byteaether.github.io
2 Upvotes

Universally Unique Lexicographically Sortable Identifiers (ULIDs) are 128-bit compatible alternative identifiers to standard UUIDs/GUIDs. They combine a 48-bit Unix timestamp with 80 bits of randomness, formatted as a 26-character Base32 string. This structure enables lexicographical ordering, index-friendly database insertion, and human-readable timestamp inspection without database calls.

While core libraries handle primitive string/byte conversions, integrated application boundaries often require manual boilerplate (custom route attributes, JsonConverter implementations, or ad-hoc parsing scripts).

The ByteAether.Ulid library updated to v1.4.2, introducing two dedicated packages to handle these ecosystem concerns:

  1. ByteAether.Ulid.AspNetCore:

    • Adds an explicit :ulid route constraint for early pipeline validation.
    • Direct System.Text.Json converters with Native AOT/trimming support.
    • OpenAPI/Swashbuckle schema transformers for typed schema generation.
  2. ByteAether.Ulid.Cli:

    • Installed via dotnet tool install -g ByteAether.Ulid.Cli.
    • CLI tool for parsing timestamps/randomness, converting byte layouts (System.Guid, Hex), handling pipeline stdin streams, and generating batch identifiers.

Usage example for Minimal API validation:

```csharp using ByteAether.Ulid; using ByteAether.Ulid.AspNetCore;

var builder = WebApplication.CreateBuilder(args); builder.Services.AddUlidRouteConstraint();

var app = builder.Build(); app.MapGet("/users/{id:ulid}", (Ulid id) => Results.Ok(new UserResponse(id))); app.Run();

public record UserResponse(Ulid Id); ```

For the complete technical breakdown and repository benchmarks, check out the full write-up: https://byteaether.github.io/2026/byteaetherulid-v142-expands-the-net-ecosystem-with-aspnet-core-and-cli-support/

(The code for this project is entirely hand-written. AI was only used to brainstorm/draft text and generate raw media assets, which I then manually polished.)


r/csharp • • 1d ago

Any senior devs here? Have you ever done this mistake before? You spend hours fixing why 3rd party api doesn't work as expected and later you realized the api version you use is not the latest one lmfao

0 Upvotes

So today, I spent 1–2 hours trying to figure out why the fuck I couldn't fetch and sync XYZ data on our internal company dashboard that is integrated to 3rd party API vendor, even though I could see the data on the vendor's dashboard.

Turns out, our backend service was using an outdated API version. But it was not depreciated tho.

That's why I couldn't fetch the data.

Man this is embarassing but I wanna know if you guys ever have made this msitake as well?


r/csharp • • 2d ago

New NBomber 6.7.0

Post image
7 Upvotes

NBomber 6.7.0 is here! This release introduces several improvements to scenario creation, warm-up configuration, test run metadata, and reporting. We’ve also fixed several issues in NBomber Cluster that could cause nodes to wait indefinitely under certain failure conditions.


r/csharp • • 2d ago

Help Should I learn C#

4 Upvotes

I'm a CS student, year 4. My first entry into programming like most people was HTML, CSS, JavaScript, and then backend development with Node/Typescript. My main goal has been to get a programming job, or internship (or anything at this point 😭), but I've always hated writing Node, just never liked it and now I'm considering switching stacks.

I enjoy writing C (I built a chess engine from scratch) and C# seems like C with oop so I don't think it should be too unfamiliar. Also it seems there might be hiring opportunities...hopefully.

Please advise


r/csharp • • 3d ago

Discussion What language would you recommend learning alongside C#?

20 Upvotes

I'm a C# developer and recently started learning C. I wanted to understand better how memory works, how programs interact with the OS, and things like Unix and low-level programming in general.I'm planning to keep learning C, but I'm wondering what you guys would recommend learning next. Would you go with C++, Rust, Go, or something else ?


r/csharp • • 3d ago

Discussion How often is now C# used instead of PowerShell in DevOps pipelines

11 Upvotes

With the file-based scripts feature in C#, it is possible to use C# instead of Powershell.

Have you see it used?


r/csharp • • 2d ago

Help C# Winforms .NET 9.0 scaling issue

Thumbnail
gallery
1 Upvotes

Hi All,

Getting ready to release my first app and im currently testing out installations on other machines. So far everything looks and works just fine however there is an issue with horizontal scaling? The first image is how it is intended to look whereas the second image is how it appeared on my friends screen. I have set the Max and Min size on the form yet the issue still persists. My friend and I both have the same Resolution monitor and display scaling so I'm really stuck with what the issue could be.

Help and advice would be greatly appreciated! Thanks!

EDIT: I have just noticed the AutoScaleMode property is set to "Font", could this be the issue?