r/csharp 7d ago

Discussion Come discuss your side projects! [September 2026]

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

C# Job Fair! [September 2026]

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

i dont understand what the => operator does.

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

r/csharp 15h ago

Showcase Native Rich Editor and Code Editor for MAUI

Upvotes

I was finding usable free code editor on MAUI because I need it in my app, but despite me having been finding so hard, unfortunately there's no such a library that can meet my needs. Every candidate I found is either paid (and very expensive), a wrapper on web-based editor, or not being actively maintained anymore. So, I decided to build my own one.

I have been spending a lot of time on bringing native rich editor and code editor experience, and now I'm finally able to get the things work on at least Windows, iOS and Android.

It renders natively on each platform, and provides seamless integrations like key bindings, context menus etc., and also, has a very small memory footprint. But note that this relies on the native rich editor solution on each platform, so unfortunately platforms like Linux are unlikely to get the support: it's technically impossible because there's no unified native rich editor interface on such platforms.

The rich editor supports a large set of RTF format natively, and the code editor is built on top of the rich editor.

This is still at early preview, and the APIs are subject to change a lot by the time the first GA version comes up. There're just still a lot need to do such as a more general syntax highlighting API, LSP integration, more test coverages, bug fixes, better API surfaces etc.

Now I'm open sourcing it under MIT license so that everyone can use it for free, forever: https://github.com/hez2010/RichEdit.Maui

Nuget packages:

Appreciate any feedback!

Rich Editor
Code Editor

r/csharp 11h ago

Best approach to insert 1 to N with POSTGRESQL + DAPPER ?

Upvotes

Hi,

The following code is simplified to make it simple ( wow ! ).

The following code works fine to create one instance of A and multiple instance of B at the same time, then return the A that was created with its id :

Sql ( postgre ) :

                   -- Create A
                   WITH inserted_a AS (
                        INSERT INTO table_a ( ... )
                        VALUES ( ... )
                        RETURNING *
                   ),

                   -- Create B
                   inserted_b AS (
                        INSERT INTO table_b ( ..., id_table_a )

                        -- Get SIGNALS
                        SELECT ...
                        FROM inserted_a

                        -- Works fine
                        CROSS JOIN unnest(
                            @array_1,
                            @array_2)

                        AS signal( ... )

                        RETURNING *
                   )

                   -- Return created A
                   SELECT ... FROM inserted_a JOIN table_c

Parameters for dapper :

// Get parameters
object parameters = new
{
    // Some properties for A
    ... 

    // Some properties for B  
    ... = a.Property.Select( ... ) // ARRAY HERE FOR UNNEST
};

Is it possible to do the same thing with multiple A and also return all A that were created with their id ?

Which means :

  1. Create all A
  2. Create all B of all A
  3. Return all A

This seems a little trickier.

It seems easy with CTE and an IEnumerable as parameter for dapper :

object parameters = a.Select(a => new
{
    // Some properties for A
    ... 

    // Some properties for B  
    ... = a.Property.Select( ... ) // ARRAY HERE FOR UNNEST
});

But dapper cannot take an IEnumerable as a parameter when there is a select as the end ( QueryAsync ).

It is also easy with a request for each instance of A, but is it possible to do it in a single request while returning all instances of A ? The goal is also to reduce latency when many A.

Thanks


r/csharp 1d ago

Discussion What to do after completing this course from microsoft learn ?

Post image
Upvotes

Hi I am going to complete part 6 of this microsoft learn C# course in a few days now what should I do after this I am thinking of doing DSA,OOPs,and SQL for a year then get a internships. These 3 topics are also in my college syllabus so my learning will not be halted during exams. Please guide on what else I can do.


r/csharp 19h ago

Showcase I got tired of loading .proto files into WireMock.Net, so I made its gRPC mocks strongly typed

Upvotes

I use WireMock.Net for gRPC component tests. Its built-in protobuf support works, but I didn’t like loading .proto files at runtime, identifying message types with strings, and matching through JSON when my test project already had generated Google.Protobuf types.

So I built WireMock.Grpc.Protobuf:

Request.Create()
    .WithBodyAsGoogleProtobuf(
        (HelloRequest x) => x.Name == "StepOne");

Response.Create()
    .WithBodyAsGoogleProtobuf(
        new HelloReply { Message = "Hello, StepOne!" });

It supports both the exact protobuf body request matching and typed predicates for tests that care about only a few fields. Internally, it unwraps the five-byte gRPC frame and lets Google.Protobuf handle the actual IMessage<T> contract.

I’m the maintainer, so blunt feedback is welcome: would this simplify your gRPC tests, or do you prefer keeping .proto definitions in the mock setup?

GitHub: https://github.com/Stepami/wiremock-protobuf
NuGet: https://www.nuget.org/packages/WireMock.Grpc.Protobuf


r/csharp 10h ago

Looking for an Asp.Net Mentor

Thumbnail
Upvotes

r/csharp 1d ago

[Showcase] Added RavenDB support to JobMaster, a distributed background job scheduler for .NET

Upvotes

JobMaster is a distributed background job scheduler for .NET I've been building (think Hangfire/Quartz, but built for horizontal scaling). RavenDB is my favourite database, so I added it as a fully supported provider alongside PostgreSQL, MySQL, and SQL Server.

If you want the architecture background: https://docs.jobmaster.hugoj0s3.dev/docs/architecture-under-the-hood/architecture-overview

I also just finished a head-to-head benchmark against Hangfire across all four database engines. One result that stood out: RavenDB gets noticeably better scheduling throughput than the SQL engines (~2000 jobs/sec vs ~1300-1600/sec at baseline, on a 25k-job burst). Full methodology and numbers here: https://docs.jobmaster.hugoj0s3.dev/docs/benchmarks/jobmaster-vs-hangfire

GitHub: https://github.com/hugoj0s3/jobmaster-net

Happy to answer questions about the architecture, the RavenDB integration, or the benchmark setup.


r/csharp 1d ago

Help Advice

Upvotes

Not sure if this is the correct place to ask this, but I thought I'd give it a go.

I'm currently learning C# and hoping to transition into tech after working as a teacher. I've done quite a bit of Microsoft Learn, but I found that I wasn't really progressing as much as I'd hoped, so I've started focusing more on building projects and applying what I learn.

So far I've built a file organisation project, and I'm currently working on a content recommendation app using Random Forest/ML.NET as a way of learning more about machine learning.

I'm at the point where I feel like I have a reasonably solid understanding of what I'm doing when I'm actually coding, but I'm not particularly good at the terminology side of things. I can usually figure out how something works and implement it, but explaining what I'm doing using the "correct" technical terminology is much harder for me.

I'm trying to figure out what level I should realistically be aiming for before I start applying for internships or junior roles. I'd really like to be job-ready sometime next year, but I'm not sure what skills/projects I should be focusing on to get there.

I'm also finding that a lot of internships and junior roles seem to expect applicants to be studying towards, or already have, a relevant degree. I have a Bachelor of Education rather than a CS/IT degree, so I'm wondering how much of a barrier that is likely to be.

For people who have transitioned into C#/.NET from another career, what did you focus on before applying for your first role? And how did you know when you were ready?

Any advice would be greatly appreciated!


r/csharp 1d ago

Help Was wanting some help with methods?

Thumbnail
Upvotes

r/csharp 2d ago

Help Exceptions vs Assertions

Thumbnail
Upvotes

r/csharp 2d ago

Non-Boxing Union Types in C# 15 (source generator)

Upvotes

The Union Types feature in C# 15 (dotnet 11) preview creates unions that box struct values (like int, float or Point) into an underlying object field, which may cause unnecessary GC pressure in high-volume usage scenarios. However, the C# specification does allow for custom user-declared union types that can employ other storage strategies as long as they expose the expected API.

I've updated the union type source generator I created years ago as part of the design effort for the Union Types feature (as an exploration tool for the designs being discussed) to target the C# 15 spec for custom union types. I've now made it available for anyone to use, so you can avoid the boxing in scenarios that warrant it.

It uses a storage strategy similar to F#'s value-type discriminated union layout. It will attempt to overlap the case values into the same memory area if possible. Otherwise, it may attempt to decompose simple structs/records into their constituent values and recompose them on access, to allow the parts that can overlap with other non-reference values to do so. You can customize this behavior per case if you desire.

It is available on nuget: https://www.nuget.org/packages/UnionTypes.Toolkit.Generator

Once the union is generated, there are no dependencies on other libraries, but it does require the use of dotnet 11 and C#15.

How to use it

In a project with the source generator package referenced, declare a partial struct type with a partial void Cases method, whose parameters denote the case types for the union. The names of the parameters are not used, so any name will do.

public partial struct MyUnion
{
    partial void Cases(
        int case1, 
        float case2,
        string case3,        
        IManifest case4,
        Coordinate case5,
        Address case6
        );
}

record struct Coordinate(float Longitude, float Latitude);
record struct Address(int Id, string Name);
interface IManifest { ... }

If you do use it and find issues, please report them here:
mattwar/UnionTypes.Toolkit: Tools for building C# Union Types


r/csharp 1d ago

Tool I’m building an offline, lightweight PC activity & input tracker. Would you use something like this?

Upvotes

Hey everyone!

I’ve been working on a lightweight Windows desktop app in C# / WPF designed to track your daily PC usage, input stats, and activity locally without bloat or telemetry.

Here is what the app currently tracks and displays:

Mouse & Keyboard Stats: Total click count (split by left/right clicks) and total keystroke count.

Key Frequency Heatmap: See which individual keys on your keyboard get pressed the most.

App Usage Tracking: Tracks active time spent per executable/application.

Active Time counter: Records total active usage time over time.

I originally thought about integrating third-party APIs like Spotify or Steam, but decided to cut them out completely to keep the app minimal, privacy-focused, and independent.

I’d love to get your thoughts:

  1. Is a lightweight, privacy-first PC stat tracker something you would actually run in the background?
  2. What other non-intrusive stats would you be interested in seeing (e.g., mouse distance traveled, active vs. idle idle timers, visual charts)?
  3. What features would be dealbreakers or must-haves for you?

Thanks for any feedback!


r/csharp 2d ago

Showcase A side project of mine: SemPtr - Semantic Pointers for C#

Thumbnail
github.com
Upvotes

TL;DR: While writing this post, I realized how long it has become, so here's a TL;DR for you: SemPtr is a semantic pointers library for C#.


Hi everyone, I wanted to share one of my side projects with you all: SemPtr.

A few weeks ago (it might been even months at this point), I needed to dig up some really old code I once had written, because I wanted to reference some of what I did back then in a current project of mine. While searching through my old and never-to-be-released projects, I stumbled upon a small library project I might have written about 5 years ago (it must have been around the time when incremental Roslyn source generators were becoming a thing). And I thought to myself, "Well, it's actually a shame you gave up on this project and neglected it for so long. You might want to ressurrect and modernize it, and then share it with everyone."

Well, that project is now SemPtr.

What is SemPtr?

I don't want to make this post too long, so I'll try to make it as concise as I can, but if you want a more comprehensive introduction, you should check out its README or its way too rudimentary documentation.

SemPtr tries to solve the limitations of C#'s raw pointers by providing semantic pointer types (read as semantically named pointer types). If you ever did some interop work with unmanaged code and found it just as annoying as I did that there is no const T* equivalent in C#, SemPtr might be the thing for you.

For that I identified five commonly used orthogonal characteristics used to distinguish certain aspects of data pointers:

  1. Nullability: Can a pointer be null or are there any guarantees that it won't be?\ This is kinda analogous to nullable reference types (T?) in C#.
  2. Persistency: Does the target of the pointer outlive the initial scope of the pointer itself? In other words, can I store the pointer and access its target some time later?\ This is kinda analogous the C#'s ref-escape rules and is even enforced through them.
  3. Sequencability: Does the pointer point to a single object or to a contiguous sequence of objects?\ You could think of this as analogous to a ref T to some kind of object in C# vs. a ref to some element within a Span<T> with the added benefit that its easier to move around the pointer through the sequence.
  4. Accessibility: How can the target of the pointer be accessed or mutated?\ This manifests in three different access levels:
    • random/read-write: The target can be read from and written to. Kinda analogous to C#'s ref parameters.
    • read-only: The target can only be read from. Kinda analogous to C#'s in/ref readonly parameters.
    • uninitialized/write-first: The target must be written to before it can be read from. Kinda analogous to C#'s out parameters.
  5. Typability: Is the type of the target known or not?\ C# has no void references, but it has void* pointers. This is analogous to the difference between a void* pointer and a typed T* pointer.

These characteristics are mapped onto C#'s type system by semantically naming the pointer types to reflect them. Since those characteristics are orthogonal, you can mix and match them to create the pointer type with the exact behavior you need. For example, there are:

  • Pointer: A simple pointer to a single, transient, mutable target of unknown type
  • PersistentPointerReadOnly<T>: A pointer to a single, read-only target of type T whose target stays valid beyond the initial scope of the pointer.
  • NullableSequencePointer<T>: A pointer to a contiguous sequence of mutable targets of type T which may be null.
  • PointerUninitialized<T>: A pointer to single, yet uninitialized target of type T. If you receive such a pointer, chances are you are requested to initialize its target; afterwards you can further read from it or write to it as needed.

Again, if you want to learn more about the characteristics and how the type naming scheme works, you should refer to the README or the documentation.

There are all in all a total of 2×2×2×3×2 = 48 data pointer types predefined in the SemPtr library.

Are function pointers supported?

To make it short, yes, function pointers are (well enough) supported by SemPtr.

I remember that one of the reasons for me giving up on the original version of this library back then was that I really struggled to get function pointer support just right. While this was partially due to technical limitations back then (some of which were solved by modern C# features, especially the new extension members syntax), some of it was simply because I did not have the experience in API design that I have now.

So now function pointers work. I don't know if I would call the support good enough yet, but at least it is a well enough experience for most users, I believe.

I won't go into too much detail here, but functions pointer have their own set of characteristics and parts of their support is made working through a Roslyn source generators that dynamically generates some source code on the user-side and that ships alongside the main library in the NuGet package. For more details, again, see the README or the documentation.

A final note on AI usage

I want to be honest and upfront with you:

Yes, I used AI in this project, primarily to help we write documentation (I'm a non-native English speaker and my English is kinda terrible), to help me make decisions when I'm indecisive, to write some tests, and occasionally to some code reviews.

No, I would never let AI touch the working code of the project. Not even for boilerplate code. AI, at least the AI I have access to, is not yet anywhere close to being reliable enough to help me write production ready code for such a project. You can be sure that all of the functioning code is written by a human (me) and that only the human (me) is responsible for the correctness and quality of the code.\ Oh, and of course, I did the visual assets myself as well. I didn't want to use sloppy AI-designed visuals for this project.

Conclusion

At the beginning of this post, I told you that I stumbled upon the initial idea for SemPtr while looking up old code for another project of mine. That project is actually an interop binding project in C#. In that project I use traditional C# raw pointers and function pointers extensively, and sometimes they're a real pain to work with. However, I didn't not yet replace them with SemPtr, due to the codebase being a little over 200K lines of code, spread across multiple repositories.

So, to be honest, I don't even use SemPtr myself yet. And furthermore, because of the simplicity of the overall idea behind SemPtr, I don't even think I'm the first person to come up with it and release to the public as a library (but I don't actually know for sure, I didn't really check).

Even so, If you want to try out SemPtr for yourself, give feedback, or if you even want to contribute to the project, I would really appreciate it. Here are the relevant links again:

If you have any questions feel free to ask them in the comments. I'd be happy to answer them.


r/csharp 1d ago

Twilio vs WASender API

Upvotes

Hi all,
Building a WhatsApp messaging feature for a restaurant SaaS product. Currently using Twilio, but exploring cost-effective alternatives for early-stage validation.
Has anyone used WASenderAPI alongside or as a replacement for Twilio?
Key considerations for us:
• Reliability & uptime for 2-way interactive messages
• Cost per message (we’re bootstrapping)
• Documentation & SDK support (C# .NET)
• Compliance & platform stability
• Ease of migration if needed
Twilio works well but the per-message cost adds up quickly during validation. Would appreciate honest pros/cons from anyone who’s used WASenderAPI in production. Or any other API that could help me in this situation.
Thanks!


r/csharp 2d ago

Help I am 13 i am intrested into making a 3d game in unity with C# are there any tips and things i should look out for?

Upvotes

i think godot is better for me since im just learning C#


r/csharp 3d ago

Help What path do I take?

Upvotes

I'm 17 and I started learning Csharp last summer, I found that really enjoy coding and I've coded stuff like minesweeper, snake, tetris and chess in Csharp files (on my own, not copying a tutorial or something). Anyway I think I might want to pursue this hobby professionally eventually, so what is a good path to take from here? What should I learn about next and how should I go about learning it? Should I switch to a different programming language, stick to CSharp or even learn multiple? What kind of things do people who write CSharp code for a living write to earn their living?


r/csharp 3d ago

Blog Another LINQ Tool for VS Code, What Should Come Next?

Upvotes

r/csharp 3d ago

Discussion Can we do data analysis using C# ?

Upvotes

Hi Currently I am learning C# and want to know if we can also do data analysis stuff using C# language. If yes in which companies is it used.


r/csharp 2d ago

Help How do I perform visual studio project creation using the .NET CLI?

Thumbnail
Upvotes

r/csharp 2d ago

New Unity Coder

Upvotes

So I've been wanting to learn coding in Unity for some time. I'm getting serious about it now, but I just don't know any good sources. I already know OOP so it's not like i need to start from the ground up (for context I've coded with Scratch all the way through school and I'm now in 9th grade and an aspiring game dev. Some of the scratch projects we're very complicated and the only thing limiting me was the lack of a third dimension and the limitations of Scratch itself). If anyone know's any good resources where they don't act as if you've never seen a line of code in your life but don't throw random things at your face that you wouldn't know, please share!


r/csharp 3d ago

I'm New the C#

Upvotes

Hey there, I'm a new Computer Science student and I was recommended C#. What are good resources or good things to help me learn C# in a open source way.


r/csharp 3d ago

Confession about my first project .

Thumbnail gallery
Upvotes

r/csharp 4d ago

Dotnet foundation transparency update

Upvotes

The DNF trying to get some visibility for their internal working so at least people understand what’s going on and if somebody willing to reevaluate their opining that maybe a good start.

For me was 2 interesting things:

  1. Meeting minutes

https://dotnetfoundation.org/about/meeting-minutes

  1. Operational procedures.

https://dotnetfoundation.org/about/policies

Second part is for these who love bureaucracy and how things moving. Should give lot of insights what to fix.

Personally I decide give “new org” a chance and try to volunteer in their activity. Not sure how things will be moving, but at least I see people who care.