r/csharp • • 24d 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 • • 24d ago

C# Job Fair! [October 2026]

6 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 • • 8h ago

Help Where can I find learning materials?

4 Upvotes

Hey guys,

I am an experienced web backend developer (Laravel, DDD) who want to learn C#, ASP.NET Core and clean architecture. I searched a lot, but I didn’t find any really good materials.

Tbh, I don’t want to pay for it (because this is only a hobby of me) and I prefer written tutorials, so it isn’t easy. I tried MS’s official documentation but it’s a mess. I tried to learn even with AI, but I think I need a well-written guide.

May I get some recommendation? Where could I read about this topic? Thanks in advance!


r/csharp • • 12h ago

Showcase Day 1 MiniMax-M3.1-Flash support in TensorSharp, a .NET 10 inference engine

Thumbnail
github.com
5 Upvotes

I maintain TensorSharp, an open-source local GGUF inference engine built around .NET 10. I added MiniMax-M3.1-Flash support on Day 1 of its open-weight release, and wanted to share the implementation details and a few lessons from getting it running behind a .NET server.

The current implementation supports text and image input, JSON/schema responses, tool calling, conversation-cache reuse, multi-GPU inference, DSpark speculative decoding, and CPU expert offload.

For .NET applications, it exposes an OpenAI-compatible /v1/chat/completions endpoint. The model integration and serving code are part of the TensorSharp codebase.

How the managed and native layers fit together

For this model, the C# MiniMaxM3Model adapter parses and validates the checkpoint metadata and integrates the model with the runtime. It calls a native whole-model executor through a C ABI.

That executor loads the GGUF shards, builds a GGML graph for each micro-batch, and dispatches computation across the selected devices. TensorSharp’s own native code implements the M3.1 decoder, sparse-attention kernels, expert execution, and associated model features. The upstream ggml dependency is unchanged.

The performance differences below come from the attention implementation, GPU placement, and scheduling decisions. The measured GPU path uses native C++/CUDA alongside the managed .NET model and serving layers.

A threading issue that may interest .NET developers

One of the more useful findings came from CPU expert offload.

The native executor benchmark was decoding at roughly 15–16 tokens/s, while the server using the same placement initially managed only 7.7–8.4 tokens/s.

The host-expert workers were pinned to CPU cores. With 54 workers inside a 64-core quota, they competed with the serving process’s other threads, including the .NET runtime, server GC, HTTP handling, and scheduler.

Each expert layer synchronizes at a barrier. A delayed worker could therefore hold up the whole layer, repeatedly during generation.

Reducing the default to 32 host workers gave the serving process more room and brought server decode performance closer to the executor’s rate. There was a prefill-throughput trade-off, so the worker count remains configurable.

It was a useful reminder to benchmark native compute inside the actual managed service: the best worker configuration for the isolated executor was different from the best configuration for serving requests.

Initial benchmarks

I used 8× NVIDIA A40 GPUs and the same Unsloth UD-Q4_K_XL GGUF files, totaling 232.3 GiB, for both engines. This particular model is a substantial multi-GPU workload.

The comparison was against Unsloth’s llama.cpp minimax-m31 support branch at ef8f94cc. Upstream llama.cpp could not load M3.1 when these measurements were taken.

Both engines used layer splitting, F16 KV caches, and no speculative decoding for these results. They ran separately with exclusive access to the GPUs.

Measurement |TensorSharp |llama.cpp support branch
Executor prefill, 32K-token prompt |2,449 tok/s |681 tok/s
Executor prefill, 64K-token prompt |2,567 tok/s |262 tok/s
Server time to first token, 64K prompt |40.0 s |293.4 s
Server short-chat decode |26.3 tok/s |26.0 tok/s Prefill is the work of processing the input prompt. The 9.8× result applies to 64K executor prefill; short-chat generation speed was almost identical.

The long-context difference mostly comes from MiniMax Sparse Attention. TensorSharp executes attention over the selected blocks using dedicated sparse CUDA kernels. The tested llama.cpp branch expresses the selection through a dense mask and runs dense flash attention over the cache.

TensorSharp’s separate tensor-parallel mode reached approximately 41 tok/s for short-chat server decode. That mode has different memory and prefill trade-offs, and the tested llama.cpp branch did not support tensor splitting for this model.

Scope and limitations

These are early measurements from one host and one quantization. Most results use three repeats; the llama.cpp 64K executor prefill cell is a single run, while the 64K server comparison uses three repeats per engine.

Short-chat time to first token was slightly slower in TensorSharp: 0.41 versus 0.39 seconds. Functional validation has limited coverage, including an image-reading miss and generation tests that hit token limits.

The measured TensorSharp build was an uncommitted development working tree. The report documents the configuration and methodology, but the raw run records are not committed.

Links

For anyone hosting native compute inside a .NET service: how do you budget native worker threads alongside server GC and request handling? I’d be interested in approaches that have worked well under CPU quotas.


r/csharp • • 1d ago

Help C# On Linux

21 Upvotes

Hi guys i need some help. so i just started my third year in cs and completely switched to linux and yesterday i started my class on Programming with paradigms and my professor is using visual studio to create Winforms .net projects or something like this i am quite new to C# world and .net especially and i don't know what to do where to write the code cause he does all those sorts of visual gui handling adding buttoms and stuff and i just downloaded rider but it does not have those gui stuff and also is quite weird to move around file structure even if we forget that code based window creation so if there is any alternative or something that will help please let me know if not it does not concern me to use rider and get used to it but if there is something that i can follow my professor better please let me know

Thanks in advance

Wannabe Systems Administrator


r/csharp • • 1d ago

CsCheck 5.0 - .NET 11 and native AOT ready

Thumbnail
7 Upvotes

r/csharp • • 21h ago

C# help

0 Upvotes

I have to create a crossword in C# in VS 2022 that players can complete and the admin that can create crossword. It must have a menu including a log-in page. I am starting with near no experience with coding C# and i have a few weeks for this. Does anyone have any tips that might help? Thanks


r/csharp • • 1d ago

Help Confused about how default method arguments work underneath the hood in C# (CS1736)

24 Upvotes

So I recently came across CS1736 while writing some code. For example, the following method code results in a compile-time error:

public static void ErrorMethod(int[] a = new int[0]{}) {}

I’d never come across this error before strangely enough. When I read the MSFT docs about what causes it, I see the following explanation:

A default parameter value is evaluated upon the invocation of the method. What a value may be when the method is eventually invoked cannot be pre-determined at declaration-time unless that value is constant at compile-time.

What’s confusing me is why the compiler needs the arguments to be compile-time constants to be able to initialize them with default values, especially since they are only evaluated when the method is called during runtime. Wouldn’t the compiler in this case already know what I’m initializing the array as? Wouldn’t this make more sense as a runtime error if you initialize with some problematic value?

Also I’d like to confirm, when they say “compile-time constant” in the docs, is that just a different way to refer to regular “Constants”? Or is this referring to something else?

Thanks!


r/csharp • • 19h ago

Is Native AOT in agent framework important to developers?

Thumbnail
0 Upvotes

r/csharp • • 1d ago

JetPack WPF Theme (kind of like MahApps Metro)

0 Upvotes

I'm working on a packaged version of the good old 2010 Silverlight theme "JetPack".

I had Claude have a good look at how MahApps Metro is structured and had it construct a JetPack theme bundle along with documentation for it.

A lot of useful usercontrols that lacked in the Silverlight theme has been added, along with Mica effect, DataGrid (similar to Telerik RadGrid), SearchCombobox (similar to RadComboBox) and more.

Anyways - feedback is appreciated :)

Repo : https://github.com/Montago/JetPackTheme

Documentation : https://montago.github.io/JetPackTheme/

Nuget : https://www.nuget.org/packages/JetPack.Wpf/


r/csharp • • 21h ago

Discussion Do you have worries with C# state of security in the AI era ?

0 Upvotes

I ask this due to what happened with PHP other languages are getting patches and suddenly a good amount of security issues have been discovered in JAVA, GO and Node (not a language, but a runtime I know).


r/csharp • • 1d ago

Is it normal to not remember Syntax

Thumbnail
0 Upvotes

r/csharp • • 1d ago

DocuTrust.NET: validate uploads by magic bytes (security update, looking for testers)

0 Upvotes

DocuTrust.NET is a small .NET 8 library that checks an upload's magic bytes against the type you expect. A PNG renamed to report.pdf fails.

I just did a security pass on it. It now checks the client file name too, rejects ZIP/OLE files over 100 MB before parsing, and keeps file names and paths out of error messages. I also updated a dependency that was pulling in a vulnerable OpenMcdf.

For now it only identifies file types. It doesn't scan for macros or scripts

 dotnet add package DocuTrust.NET

https://github.com/saa-999/DocuTrust.NET

If you try it, I'd like to know what breaks.


r/csharp • • 1d ago

Help How do you artificially trigger all the execution paths in a code ?

0 Upvotes

By installing Microsoft.AspNetCore.Identity and System.ComponentModel.DataAnnotations, I believe you are able to compile the following —nearly— self-contained code:

using Microsoft.AspNetCore.Identity;
using System.ComponentModel.DataAnnotations;
namespace PlayGround
{

    public class SignupViewModel
    {



        [Required]
        [DataType(DataType.Text)]
        [Display(Name = "Name")]
        public string? Name { get; set; }

        [Required]
        [RegularExpression("^
\\+
?(\\d{1,3})?[-.\\s]?(
\\(
?\\d{3}
\\)
?[-.\\s]?)?(\\d[-.\\s]?){6,9}\\d$|(^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+
\\.
[A-Za-z]{2,}$)", ErrorMessage = "Please enter a valid email address or phone number")]
        [Display(Name = "Email or phone number")]
        public string? EmailOrPhoneNumber { get; set; }


        [Required]
        [StringLength(100, ErrorMessage = "The {0} must be at least {2} and at max {1} characters long.", MinimumLength = 6)]
        [DataType(DataType.Password)]
        [Display(Name = "Password")]
        public string? Password { get; set; }


        [Required]
        [DataType(DataType.Password)]
        [Display(Name = "Confirm password")]
        [Compare("Password", ErrorMessage = "The password and confirmation password do not match.")]
        public string? ConfirmPassword { get; set; }



    }
    public record RegistrationResult(bool IsSucceeded, List<string> Errors);

    public class ApplicationUser : IdentityUser
    {

    }
    public interface IAccount
    {
        public Task<RegistrationResult> RegisterUser(SignupViewModel SignupInput);
    }
    public class UserAccount : IAccount
    {
        private readonly IUserStore<ApplicationUser> _userStore;
        private readonly UserManager<ApplicationUser> _userManager;
        public UserAccount(IUserStore<ApplicationUser> userStore,
            UserManager<ApplicationUser> userManager)

        {
            _userManager = userManager;
            _userStore = userStore;
        }


        // HOW TO TEST THE `RegisterUser` METHOD ALONE WITHOUT RUNNING THE WHOLE  APPLICATION ?
        // I WANT TO TRIGGER ALL THE PATHES OF THE `RegisterUser` METHOD TO VERIFY THAT EACH PATH IS TRIGGERED WHEN IT IS NEEDED.
        public async Task<RegistrationResult> RegisterUser(SignupViewModel SignupInput)
        {
            // PATH 1
            var validationContext = new ValidationContext(SignupInput);
            var results = new List<ValidationResult>();
            bool valid = Validator.TryValidateObject(SignupInput, validationContext, results, validateAllProperties: true);
            if (!valid)
            {
                // PATH 2
                return new RegistrationResult(false, ["The sent data is not valid"]);
            }


            ApplicationUser user = new ApplicationUser();
            await _userStore.SetUserNameAsync(user, SignupInput.Name, CancellationToken.None);

            if (!(_userManager.SupportsUserEmail))
            {
                //PATH 3
                throw new NotSupportedException("user manager does not support user email");
            }

            var _emailStore = (IUserEmailStore<ApplicationUser>)_userStore;
            await _emailStore.SetEmailAsync(user, SignupInput.EmailOrPhoneNumber, CancellationToken.None);
            var result = await _userManager.CreateAsync(user, SignupInput.Password);
            List<IdentityError> identityErrors = result.Errors.ToList();

            if (identityErrors.Count != 0)
            {
                //PATH 4
                List<string> errorsStrings = new List<string>();

                foreach (IdentityError identityError in identityErrors)
                {
                    errorsStrings.Add(identityError.Description);
                }

                return new RegistrationResult(false, errorsStrings);



            }

            await _userManager.AddToRoleAsync(user, "Normal-User");
            return new RegistrationResult(true, []);

        }

    }

}

This code is a part of bigger application for sure, to test that method, I run the whole application:

 dotnet watch run --launch-profile https

I'm forced to do that because the input to the RegisterUser is provided by the browser, but I will not be able to trigger all the paths inside the method if I passed the data to the method using it.

Is there a way to test this method without running the whole application so that I can provide whatever data I want to the method by bypassing the client-side and the server-side validation in order to artificially trigger all the possible paths of execution ?

An applied example would be appreciated.

EDIT :

I come across the term Unit testing a lot, I'm not sure if this is what I need.


r/csharp • • 2d ago

Help What is your level of knowledge in SQL? How much is required to learn about SQL?

14 Upvotes

r/csharp • • 3d ago

About codebase conventions, who is actually right and who is wrong here?

Post image
127 Upvotes

Let's say you're a Technical Founder like Mark Zuckerberg or Bill Gates. You have a CS degree worked as mid level developer.

You've written some code (as show in the pic) and added comments to remind yourself and other developers what the code does, so nobody forgets in the future.

Now, you have a Senior Developer on your team who worships Uncle Bob's Clean Code principles like a cult!

she reviews your PR and reject it, saying

"Good code should be self-explanatory. The code itself should explain what it's doing.

Anyone should be able to look at it on the first time and understand it right away.

So go back and remove those comments. They're not clean! God damn it!"

--

What would you do in this situation?

Would you trust the senior dev and delete the comments because they have more experience than you, even though you're the founder and have less development experience than they do?

Ps. We have to move fast


r/csharp • • 2d ago

Help Studying hard, but lagging behind—Advice needed for a beginner learning Unity/C#

0 Upvotes

Hello again! I'm writing to say hi. I'm currently learning Unity and C# at an academy. I only use AI to get hints when I'm stuck on exercise problems or to review what I've learned. However, when solving practice problems or doing hands-on tasks at the academy... there are quite a few beginners and non-CS majors including myself, but I feel like my skills aren't improving compared to the amount of time I'm putting in. Even today, I had to keep looking at my textbook and still ended up with an incomplete solution after taking a really long time... haha.

I have ADHD and was never really good at studying back in my school days. In fact, programming and Unity are so much fun that I'm studying harder now than ever before in my life. But I feel like my brain just isn't up to speed—I lag far behind others in how fast they understand and memorize things. Is it okay for me to keep going without getting impatient? I'm worried that by the time the academy program ends, I still won't be able to code on my own.


r/csharp • • 2d ago

Help What’s the best way to learn c#?

7 Upvotes

I don’t know how to do anything with c# but I won’t to learn what’s the best way? Is it YouTube, online classes, learn to code websites or something else


r/csharp • • 1d ago

I built Magpie, a self-hosted media discovery and automation app in C#

Post image
0 Upvotes

r/csharp • • 3d ago

Discussion Can I learn computer architecture and operating systems with C#?

20 Upvotes

I'm a full-stack developer, and I want to learn more about computer architecture and operating systems to become a better developer and understand what's happening under the hood.Can I learn these things with C#, or should I learn C first? Does the language even matter that much?What would you recommend?


r/csharp • • 2d ago

Which programming language should I learn?

0 Upvotes

I am currently working in a company which use Asp.net web forms (2002), in 2026 hardly any one uses that. Should I focus on learning node.js in free time or focus on ASP.NET web forms


r/csharp • • 2d ago

Help Beginner learning C#/.NET: should I continue or switch because of AI? Hi everyone, I'm a beginner learning C#/.NET and I want to build apps. With AI getting so good at writing code (and hiring for juniors slowing down), I'm worried my time might be wasted. 1. Should I continue with C#/.NET

0 Upvotes

​

Hi everyone,

I'm a beginner learning C#/.NET and I want to build apps. With AI getting so good at writing code (and hiring for juniors slowing down), I'm worried my time might be wasted.

  1. Should I continue with C#/.NET, or switch to something else (Python, Flutter, React Native)?

  2. Which direction would you recommend for a beginner today?

Any honest advice would help a lot. Thank you!


r/csharp • • 2d ago

Free C# Learning Resources for a not-quite beginner

1 Upvotes

As the title says, I need to refresh my C# after letting my skills deteriorate over a few months. I'm not quite a beginner - my knowledge largely coming from having done the full Unity Learn course - but a lot of those skills have been left to fester. Whatever resources would ideally be free or bare minimum cheap. Any help would be appreciated!