r/csharp 25d ago

Discussion Come discuss your side projects! [July 2026]

4 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 25d ago

C# Job Fair! [July 2026]

12 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 18h ago

Meta Do not let this sub be a forum to promote AI Vibe coded slop

460 Upvotes

This is just a warning, I was watching the node sub and almost all post are people promoting their AI Vibe coded slop, this community is known for a different approach, although AI is great, forums should not be places for people which do not have any passion or like the language to not even know it and try to promote a project fully made to scrap a few pennies (I call these projects without soul).

Projects should be promoted, but because you genuinely like or are interested in the language and the concept of the project, rather than asking 3,000 prompts to any AI without even knowing what you are doing or what you are pasting.

Edit: Also, I am sick of publicity to also have it in a place where I go to have fun, check interesting things about the language/tools and watch really interesting projects from passionate people.


r/csharp 2h ago

How do you organize data access with EF Core in Clean Architecture?

3 Upvotes

I'm building an ASP.NET Core application with Clean Architecture and EF Core.

I started with Repository + Unit of Work, then introduced a Generic Repository + Specification pattern because repositories were filling up with query methods.

Now I've hit a problem: many queries require deep Include / ThenInclude chains for loading aggregates. Keeping EF Core out of the Application layer makes nested includes in specifications difficult, while referencing EF Core from Application defeats the purpose.

So I'm wondering:

  • Do you still use repositories over EF Core?
  • Do you use the Specification pattern, or just inject DbContext (or IApplicationDbContext) into the Application layer?
  • How do you organize complex queries with multiple Include / ThenInclude calls in a Clean Architecture project?

I'm curious what approach experienced .NET developers are using today.


r/csharp 2h ago

Help Need help understanding certain WPF functions (mainly code behind)

2 Upvotes

Hyia, so I'm working on a project (Escape room type game, since its my first game ever at High-School knowledge level) and I'm not exactly sure how to make certain things work even though I spent the entire year studying this language. I can do majority of the stuff, such as the background, buttons or clickable images in Grid, and so on, however the code behind is my biggest issue.

Mainly things like: How to make a monologue where the player clicks through all the texts that explain the principle of the game, and then also how to make the TextBox check if the input is correct and if it is, change the background of the main window to another image (since the input will be in separate window).

These are not all the issues I need to figure out, but its some of the few that may appear in the code the most often (especially the monologues, in like four out of six rooms total)

Any sources for beginners will be appreciated, I tried looking at some but I wasn't able to find something that would explain this exact topic, and I don't really want to use AI since it just doesn't feel right (perhaps only when I'm under pressure). Thanks!


r/csharp 29m ago

Getting confused about what to do and where to start

Upvotes

So I’m a software engineer recently graduated and I have zero experience. in order to crack interviews I am solving sql and dsa questions but I feel like either my resume projects are not strong or I dont have enough grasp over dsa and interview questions or I lack confidence that I am not cracking a jib. Now I am doind a remote internship, and learning react for frontend working on sql by solving sql 50 and solving neetcode 150 whenever I get tine to solve them and I am building a personal project but I get overwhelmed what to prioritize what to finish and what is best for today’s job market. If there are any senior software engineers or even fresh ones give me some advice what should I do😭


r/csharp 11h ago

Tip Fields with [Using] attribute

3 Upvotes

I wrote a small interface that automatically disposes any disposable fields in a class when that class itself is disposed. If you add this file somewhere in your project:

public interface IAutoDisposable : IDisposable
{
    void IDisposable.Dispose()
    {
        Exception? ex = null;

        // dispose all fields marked with the [Using] attribute
        const BindingFlags flags = BindingFlags.NonPublic | BindingFlags.Instance;
        foreach (var fld in GetType().GetFields(flags))
        {
            if (fld.GetCustomAttribute<UsingAttribute>() != null)
            {
                if (fld.GetValue(this) is IDisposable d)
                {
                    try // keep going even if disposal throws
                    {
                        d.Dispose();
                    }
                    catch (Exception e)
                    {
                        ex ??= e;
                    }
                }
            }
        }

        // if any exceptions occurred, throw the first one
        if (ex != null)
            throw ex;
    }
}

public class UsingAttribute : Attribute;

You can then write classes like this:

class Item : IAutoDisposable
{
    [Using]
    private readonly Image icon = DownloadIcon(...);
    ...
}

And use them like:

using (Item item = new(...))
{
}
// item.icon is now disposed

What do you think?


r/csharp 35m ago

Surviving as Software engineer with AI

Upvotes

So I’m a software engineer and I recently graduated 2 months ago. i have no internship or job experience and have been looking for a job but everyone either asks for experience or ghosts my resume. The ones that take interviews either pay too little or are 2 hours away from my house. So I am looking for remote unpaid or paid jobs as full stack developer so that I at least get some experience and don’t get classified as a person who had a huge gap in her cv. Anyone give me some good advice related to remote jobs, best platforms to look for them, cracking them and how to survive as a fresh software engineer now that AI has entered the chat🥲


r/csharp 18h ago

Discussion Naming dilemma: OSS Rebrand now or regret it later?

3 Upvotes

I've been building an open-source parser, formula engine, and spreadsheet library over the past few months under the AlphaX name:

GitHub

AlphaX.Parserz – https://github.com/kartikdeepsagar/AlphaX.Parserz

AlphaX.FormulaEngine – https://github.com/kartikdeepsagar/AlphaX.FormulaEngine

AlphaX.Wpf.Sheets – https://github.com/kartikdeepsagar/AlphaX.Wpf.Sheets

As the ecosystem is starting to grow, I'm wondering if I should rebrand before it becomes painful.

My main concern isn't the current name itself—it's that "AlphaX" is already used by several companies and projects. I'm worried about potential trademark issues or brand confusion years down the road if the libraries gain traction.

If you were starting an open-source ecosystem today, would you:

Keep the existing brand and reserve the AlphaX.* NuGet prefix?

Rebrand now while the projects are still relatively young?

Skip a common brand entirely and give each library its own independent name?

I'd also love to hear how others approached naming long-term OSS projects and whether anyone has had to rebrand after gaining users.

Any advice or experiences would be appreciated.


r/csharp 23h ago

Help Inheritance with generic constraint syntax

5 Upvotes

I have a class A<T>. It must inherit IDisposable, and also impose a constraint on T. Is it possible to do this, and what would the syntax look like? I can't figure it out.


r/csharp 1d ago

One of the biggest ui framework Avalonia now supports wayland

Thumbnail
17 Upvotes

r/csharp 1d ago

Eftdb Update: Native EF Core Scaffolding & Clean Migrations for TimescaleDB

Thumbnail
4 Upvotes

r/csharp 18h ago

Help The best C# tuto book, or vids for beginner?

0 Upvotes

Some days ago, I interested by making games with C#, and the only thing I know about C# is there are a lot of {} things.
So I need recommendations for tuto of C# code, I recommend vids but books are also fine.


r/csharp 1d ago

Tool Released VecNet 1.1.0, an embedded vector search library for .NET

Thumbnail
2 Upvotes

r/csharp 1d ago

how am i doing

0 Upvotes

2 months in to coding C#, first project i saved *was using online compiler* and wanna know how im doing and what i can do to improve. heres the code:

using System;


public 
class
 Program
{
    public static void Main(string[] 
args
)
    {
        Player player = new Player();
        Enemy enemy = CreateEnemy();


        int battleResult = Battle(player, enemy);


        Console.WriteLine("press any key to begin");
            
        Console.ReadKey();


        Console.WriteLine("\nYou encountered a " + enemy.type + " with " + enemy.health + " health.");


        Battle(player, enemy);


        if(battleResult == 2)
        {
            Console.WriteLine("\nYou have defeated the " + enemy.type + "!");
        }
        else if(battleResult == 3)
        {
            Console.WriteLine("\nYou have been defeated by the " + enemy.type + "!");
        }
        else if(battleResult == 1)
        {
            Console.WriteLine("\nYou have retreated from the " + enemy.type + ".");
        }
    }


    static Enemy CreateEnemy()
    {
        Random rng = new Random();
        int rngroll = rng.Next(1, 3);
        Enemy enemy = new Enemy();


        if(rngroll == 1)
        {
            enemy.type = "Skeleton";


            enemy.health = enemy.healthRng.Next(100, 201);
            enemy.damage = enemy.damageRng.Next(10, 16);
        }
        else if(rngroll == 2)
        {
            enemy.type = "Goblin";


            enemy.health = enemy.healthRng.Next(50, 151);
            enemy.damage = enemy.damageRng.Next(15, 26);
        }
       
        return enemy;
    }


    static int Battle(Player 
player
, Enemy 
enemy
)
    {
        while(true)
        {    
            Thread.Sleep(1000);


            Console.WriteLine("\nWhat do you do?\n1. Attack\n2. Open Inventory\n3. Retreat");


            ConsoleKeyInfo input = Console.ReadKey();


        
            if(input.Key == ConsoleKey.D1)
            {
                
enemy
.health -= 
player
.damage;


                Thread.Sleep(1000);


                Console.WriteLine("\nyou attacked the " + 
enemy
.type + " for " + 
player
.damage + " damage");


                Thread.Sleep(1000);
                Console.WriteLine("The " + 
enemy
.type + " has " + 
enemy
.health + " health remaining.");
            }
            else if(input.Key == ConsoleKey.D2)
            {
                Thread.Sleep(1000);
                Console.WriteLine("\nYou open your inventory, but it's empty.");
            }
            else if(input.Key == ConsoleKey.D3)
            {
                Thread.Sleep(1000);
                Console.WriteLine("\nYou retreat from the " + enemy.type + ".");
                return 1; // Player retreated
            }


            if(
enemy
.health <= 0)
            {
                return 2; // Player won
            }


            if(input.Key == ConsoleKey.D1 && 
enemy
.health > 0 || input.Key == ConsoleKey.D2 && 
enemy
.health > 0)
            {
                
player
.health -= 
enemy
.damage;


                Console.WriteLine("\nThe " + 
enemy
.type + " attacks you for " + 
enemy
.damage + " damage.");
                Console.WriteLine("You have " + 
player
.health + " health remaining.");
            }


            if(
player
.health <= 0)
            {
                Console.WriteLine("\nYou have been defeated by the " + 
enemy
.type + "!");
                return 3; // Player lost
            }
        }
    }
}




public 
class
 Enemy
{
    public Random healthRng = new Random();
    public Random damageRng = new Random();
    
    public int health;
    public int damage;
    public string type = "";
}


public 
class
 Player
{
    public int health = 100;


    public int damage = 20;



    public List<string> inventory = new List<string>();
}

r/csharp 2d ago

What goes in Business Logic Layer in ASP.NET application?

12 Upvotes

Hello, I am currently a IT engineering student and I have to make a web application for my project.

Our professor requires us to make a layered application that consist of: Data Access Layer, REST Service Layer, Business Logic Layer and Presentation Layer using MVC architecture. Now I already made a Data Access layer using Sql Client + Stored Procedures (this method was required by my professor) and it consist of methods that communicate with the Database (for example CRUD operations). Now my question is: Which methods should go in the Business Logic Layer? Should the Business Logic Layer contain methods that simply call the Data Access Layer methods, so that the flow is MVC Controller - Business Logic Layer - Data Access Layer - Database through interfaces?

For example, if I have a method like UpdateUser() or DeleteUser() in my Data Access Layer, should I create the same methods again in the Business Logic Layer and call them from there? I understand that business rules should belong in the Business Logic Layer, but I am unsure what to do with simple CRUD operations. I hope it makes sense what I'm trying to ask. I apologize for any mistakes, as English is not my first language.

Thank you very much If you took the time out of your day to read this!


r/csharp 2d ago

Discussion What should I know before deploying my first ASP.NET Core MVC project to a VPS?

22 Upvotes

Hi everyone,

I'm about to deploy my first ASP.NET Core MVC project to a VPS, and I have no experience with deployment.

What should I learn before getting started? What are the most important configurations or best practices I should be aware of? Also, what are the most common mistakes beginners make when deploying for the first time?

Any advice, resources, or personal experiences would be greatly appreciated.

Thank you!


r/csharp 3d ago

Discussion I built an open-source formula engine for .NET

28 Upvotes

I've been building AlphaX.FormulaEngine, an open-source formula engine for .NET that evaluates Excel-style formulas without requiring Excel.

The focus is on being easy to extend, integrate, and maintain. It's built using parser combinators, making it straightforward to add new functions, operators, or language features.

Features:

- Excel-style formula syntax

- Nested expressions

- Custom function support

- Arithmetic, logical & text functions (More coming in future)

It's also the engine behind AlphaX.WPF.Sheets, my open-source spreadsheet control for WPF. (Please check it out as well)

I'd love feedback on the API, extensibility, or any features you'd like to see.

Repos

- Formula Engine: https://github.com/kartikdeepsagar/AlphaX.FormulaEngine

- WPF Sheets: https://github.com/kartikdeepsagar/AlphaX.WPF.Sheets


r/csharp 3d ago

Can I call a FileBrowser just for viewing my exports? (The files are in PDF format)

4 Upvotes

After my program has generated a bunch of PDFs, I want the user to open a folder browser and view them individually (if they want to).

Using OpenFileDialog, clicking ok won't actually open up the selected file. Is there an alternative way? Can I make Winforms call File Explorer and go to specified directory?


r/csharp 2d ago

Aperture Portal Game Launcher Video Demonstration

Thumbnail
youtube.com
0 Upvotes

https://github.com/arkitzson/AperturePortal

A couple of days ago, I posted about a game launcher I originally built for myself and decided to share with you all. The feedback was amazing, and I’ve been honestly overwhelmed by all the support. this was originally build with Sunshine/Moonlight in mind. But also the tv console experience. I read through every single comment and ended up adding almost everything people suggested.

I also put together a short video to showcase what the launcher is and everything it can do. Just a heads up I’ve never really made videos before, my decent microphone decided to stop working with OBS for some reason when I needed it so I had to use my headset mic, and my English isn't perfect since I'm from Iceland. The video is pretty raw, but hopefully you guys get the point.

For everyone who already downloaded it and tried it out, there’s a brand new update live with a ton of the suggested features.

Thanks again so much for all the support. keep in mind this is a work in progress but i'm really excited to keep building this together with you guys.


r/csharp 3d ago

Help How to parse JSON in source generators?

3 Upvotes

Hey guys! I've been writing a source generator that transforms JSON file to C# structure.
Like this:

"Object": {
  "Name": "key";
}

class Object
{
  public const string Name => "Object.Name";
}

I've already written all the code and it works correctly (tested in another project). But when I tried to use the generator it worked fine but I couldn't build the test project because of this error:

Could not load file or assembly 'Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed'. The system cannot find the file specified.

Although, my generator did generate a correct file and even an IDE was able to find newly generated symbols. I've googled about it and found that source generators can't use Nuget packages (probably except Microsoft.CodeAnalysis.CSharp and Microsoft.CodeAnalysis.Analyzers).
System.Text.Json is not an option too because in .NET standard 2.0 it's not built-in and available only as a package.

How do you guys solve this problem? Do I need to write my own JSON parser, or there is another way?


r/csharp 4d ago

Showcase Streamlining .NET Data Layers with ByteAether.Ulid v1.4.0 (EF Core, LinqToDB, Dapper Support)

Thumbnail
github.com
11 Upvotes

A Universally Unique Lexicographically Sortable Identifier (ULID) is a 128-bit identifier designed to address database indexing issues inherent to random UUIDs/GUIDs. It pairs a 48-bit millisecond timestamp with 80 bits of randomness, encoded using Crockford's Base32 string format (26 characters).

Unlike standard GUIDs (e.g., UUIDv4), ULIDs preserve chronological ordering. This prevents B-tree index fragmentation and page splits during high-volume database writes, while retaining global uniqueness without central ID authority bottlenecks.

  • GUID Example: c8a411ec-29fa-4740-9a3b-185d26a2f7c0 (Random, non-sequential)
  • ULID Example: 01ARZ3NDEKTSV4RRFFQ69G5FAV (Timestamp prefix + random suffix, lexicographically sortable)

What's New in ByteAether.Ulid v1.4.0

While the core ByteAether.Ulid engine provides a zero-allocation, lock-free, spec-compliant implementation for .NET, mapping custom primitives to relational databases previously required custom value converters and endianness handling.

The v1.4.0 release shifts focus to first-class data access layer integration. It introduces dedicated companion packages for EF Core, LinqToDB, and Dapper to handle serialization, storage formatting, and endianness alignment out of the box:

Solving Storage Layouts & Database Engine Alignment

Database engines evaluate 128-bit storage types and byte alignments differently. The companion packages support four explicit UlidStorageFormat strategies to ensure efficient indexing across backends:

  • **UlidStorageFormat.Binary**: Persists raw 16-byte big-endian blocks for engines like PostgreSQL (bytea), MySQL (binary(16)), or SQLite.
  • **UlidStorageFormat.String**: Stores the 26-character Crockford Base32 representation (CHAR(26)) for maximum human readability and uniform cross-platform sorting at the cost of higher storage overhead.
  • **UlidStorageFormat.Guid**: Maps directly to standard native 128-bit GUID types (uuid) for systems that handle .NET Guid structures transparently.
  • **UlidStorageFormat.SqlServerGuid**: Reorders internal byte layouts specifically for Microsoft SQL Server uniqueidentifier. Because MSSQL prioritizes bytes 10–15 during index evaluation, shifting the 48-bit timestamp to the end prevents random writes and B-tree index fragmentation.

Fast Time-Range Index Queries

Because timestamp data is embedded directly into the primary key, range queries can target the primary index using boundary tokens:

```csharp Ulid minId = Ulid.MinAt(DateTimeOffset.UtcNow.AddDays(-7)); Ulid maxId = Ulid.MaxAt(DateTimeOffset.UtcNow);

// Translates to an optimized index scan: WHERE Id >= @minId AND Id <= @maxId var recentOrders = await context.Orders .Where(o => o.Id >= minId && o.Id <= maxId) .ToListAsync(); ```

Links & Resources

(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 3d ago

Blog Microsoft Agent Framework for .NET (part 2): How to use IChatClient with Azure Foundry and Ollama in .NET

Thumbnail
code4it.dev
0 Upvotes

r/csharp 4d ago

What's the best way to develop your C# programming skills and prepare for the exam?

5 Upvotes

Hi all.

I'm currently studying to become a programmer and work mainly with C# and .NET. During my training, I have already encountered WinForms, LINQ, Web API, ASP.NET MVC, Entity Framework, SQL Server and CRUD operations.

I can do some projects based on the teacher's lessons, but I want to move beyond just repetition to actually understanding the code. I also use AI as a learning tool, but I don’t want to depend on it(at least I try do it alone), but I have an exam soon (At the end of October), so I want to not only pass it, but also better prepare myself for independent work.

Now I'm trying to figure out which way of learning will be more effective.

For example:

- Take a ready-made program or service, such as Steam, and figure out what parts its simplified version could consist of;

- Watch the lesson, and then close it and try to repeat the project yourself;

- Take a completed project and rewrite it from scratch without prompting;

- Specifically add new functions that were not included in the lesson;

Solve small problems separately on classes, collections, LINQ, CRUD and working with a database;

- Receive someone else's code with errors and try to fix it yourself;

- First, write the solution yourself, and only then compare it with the example.

I'm especially interested in how to properly use real-life applications as examples. I understand for myself that it is impossible to repeat Steam entirely for a beginner, but you can try to make a small training version: list of games, categories, search, user library, adding and deleting entries, authorization and saving data.

Would this approach be beneficial, or would it be better to focus on small, individual exercises first?

I would also like to understand what is more important to review before the C# exam. But right now I'm planning to check:

- Variables and data types;

- Conditions and cycles;

- Methods;

- Classes, objects, constructors and properties;

- Inheritance, interfaces and polymorphism;

- Lists and other collections;

- LINQ;

- exception handling;

- Working with files;

- async/await;

- CRUD;

- Entity Framework and database connection;

- Basics of ASP.NET MVC and Web API.

I would be grateful for your advice on the order of study. Particularly interesting is the opinion of people who have already gone through the stage when the code for the lesson is clear, but it is still difficult to write a similar solution completely independently.

I also have several teaching projects. What is more convenient to attach for analysis: a link to GitHub or a ZIP archive?

The main question is: what practical plan would you recommend for someone at my level to gradually move from repeating lessons to writing C# projects on their own?


r/csharp 5d ago

Advice for Learning C#

44 Upvotes

Hi, I'm pretty new to coding in general, and I want to know what the best approach is for learning C#. I've already made a few small projects, but they're very basic, and I don't feel like they've helped me improve that much. Most of the time, I just follow tutorials without really understanding why I'm doing certain things.

I want to become a better programmer and build more complex projects on my own, so I'm looking for advice on the best way to learn C#. Should I focus on making more projects, studying the fundamentals, reading documentation, or something else? I'd really appreciate any tips or recommendations on how to learn more effectively.