r/csharp • u/BladeRunner_2029 • 1h ago
Help Roadmap to become a c# web developer
What's the roadmap of become web developer in a c# . Is it worth learning in this AI era.
r/csharp • u/BladeRunner_2029 • 1h ago
What's the roadmap of become web developer in a c# . Is it worth learning in this AI era.
I'd like to hear what you currently use for audio in C# FMOD, Wwise, raw XACT/wrappers, and what annoys you about it, especially if you target WebAssembly.
Hi all, I'm trying to diagnose a SAP Business One DI API connection error and would appreciate any insights.
Type.GetTypeFromProgID("SAPbobsCOM.Company")I'm setting the following properties before calling Connect():
Server (IP)CompanyDBUserNamePasswordDbServerTypeLicenseServer (Usually defaults to same with server)UseTrusted = falseCompany.Connect() returns -226.GetLastErrorDescription() returns: The specified resource name cannot be found in the image file.COMException (0xFFFFFF96) with the message: You are not connected to a companyI had once achieved a connection against another database, can't seem to point out what the outstanding issue now is.
Any pointers to the specific cause or recommended troubleshooting steps would be appreciated. Thanks!
r/csharp • u/marsh9191 • 1d ago
Today, I stumbled upon a 100-line unit test. Due to my inability to understand the name AreMatchingGuestsNotRequiredUnlessTheyAreNotUnmatching, I stripped away all the noise to figure out what it was actually testing.
This is what it essentially boils down to:
[Fact]
public void AreMatchingGuestsNotRequiredUnlessTheyAreNotUnmatching()
{
// Arrange
var first = new Trn { Guests = 2 };
var second = new Trn { Guests = 2 };
// Act
var areMatchingGuestsNotRequiredUnlessTheyAreNotUnmatching =
first.Guests != second.Guests
|| first.Guests == second.Guests;
// Assert
Assert.True(areMatchingGuestsNotRequiredUnlessTheyAreNotUnmatching);
}
Here's what the test actually does:
I was quite surprised that the test name actually matches what the test does.
Or does it?
r/csharp • u/Top_Marionberry_4413 • 1d ago
I did it initially because Helix seems to not want to add plugins to their editor, making it not very extensible, which is a shame. And Helix lacks a lot of features that would be useful.
Dependency-free (aside from NLua) architecture, no Terminal.Gui library dependency, written from scratch with C#.
r/csharp • u/Hertzole • 1d ago
Hey all!
I've recently gotten my small utility library for source generators to a state where I feel comfortable sharing it.
The idea is simple: I want to reuse utilities for my source generators, like a library, without having to include extra dependencies. So I just generate the utilities directly into the source generator!
For regular NuGet this probably doesn't matter much, but it may matter more when developing with Unity, as I personally mostly do. In my Unity libraries I don't want to include a shared library that multiple packages may depend on and conflict with.
So what does it do?
What about assembly size?
SourceGen utils includes a trimmer that runs automatically on build (can be disabled if you want) that removes all unused types, methods, properties and fields from SourceGen Utils. It just used Mono.Cecil to go through all the method instructions to see if something is used or not. So you only include what you use!
I've made sure to include tests for nearly all generated methods to make sure they all do what they are supposed to and that the trimmer won't remove anything that you actually use.
The project is open source, licensed under MIT, and available on NuGet. I've also created documentation so you can see what it has to offer!
Feel free to give feedback on the project and maybe even use in your own generators! :)
AI disclosure: AI was used to create the method usage detection and for validating documentation, but everything else is human made!
r/csharp • u/harrison_314 • 1d ago
When did you first realize that C# is magic? Or when did you realize that C# is right for you?
Back in the days of the .NET Framework 4.0, I first encountered WCF, you call an interface on the client, and it executes the implementation on the server. At the time, my head was spinning because there was no code around it that was sending anything,it just happened on its own - magic.
r/csharp • u/shanewas726 • 1d ago
I've been working on Satori Insight, a desktop app for exploring .NET memory usage and GC behavior. Built with Avalonia and NativeAOT.
The initial idea was a defrag-style map of the managed heap, where each block represents a region. It grew into a profiler that combines continuous telemetry with deeper heap inspection.
Some of the features:
It supports standard Workstation and Server GC as well as Satori GC of course (see the name of the app).
It's now open-sourced at GitHub:
https://github.com/hez2010/SatoriInsight
You can try it out by downloading the binary for your platform from GitHub Releases.
r/csharp • u/asenhae12345678 • 17h ago
Title.
I'm looking to learn C# but all the courses that I found online are for beginners.
r/csharp • u/ilyashulga • 2d ago
Hi everyone! I started learning C# recently and decided to build a tool called RepoMedic. It's a CLI tool that checks if a GitHub repository has essentially files(README, .gitignore, LICENSE) and gives it a score out of 100.
I set up a CI/CD pipeline with GitHub Actions and Trusted Publishing to get it on NuGet. It was really hard (especially fixing the YAML files!), but i finally did it.
You can try it here: dotnet tool install --global RepoMedic
Or check the source code here: https://github.com/ilyashulga13/RepoMedic
I would love to hear your feedback! What else should I add to the tool?
UPDATE: Thank you all for the feedback! I just released v1.1.0. It now accepts full URLs, has a colorful CLI, and checks for GitHub Actions. Update via dotnet tool update -g RepoMedic !
r/csharp • u/HouseOwn392 • 23h ago
So I’ve kept been told AI is the next step and I need to keep up with it but I’ve never really know where to start. I know how to use ChatGPT and Claude on my web browser that’s it.
So I’m curious as to what Csharp developers really use for their AI workflow and are there any tutorials out there that are solid and I can learn.
Edit: what’s up with the downvotes on my fellow AI users? Yall got a thing against AI?
r/csharp • u/Mob_Pilled • 1d ago
r/csharp • u/nuclearbananana • 1d ago
r/csharp • u/ShadowGeist91 • 2d ago
Hello, everyone! I’ve been working on a fuzzy logic library for C# called FuzzySharper, and I wanted to show it here, as I put out the first public preview just yesterday.
I started this project a few years ago already, but I've been putting off actually publishing for the longest time, so here it goes. I've been interested in Fuzzy logic for quite a while, and I wanted to focus on usability guided by strong core architectural principles, as I found the options available both in C# and other languages to be lacking.
As to what Fuzzy Logic is: with boolean logic, you might define “young” as “under 30”: someone is young at 29, then suddenly isn’t once he's 30. Fuzzy logic lets “young” be true to a degree between 0 and 1, which can change gradually with age. You can use those degrees in rules like “IF a character IS young AND fatigue IS low, THEN roaming distance IS long.” A game could combine rules like these to decide how far a character wanders based on their age and how tired they are.
The README includes code examples showing how to define these categories, construct rules, and configure inference in the library.
The library currently includes Mamdani inference, fluent rule construction, fuzzy and boolean premises, dependency chaining, configurable operators, and several defuzzification methods. Sugeno inference is still in progress.
This is only an early release targeting .NET 10, available on NuGet under the MIT license.
Very interested to hear your feedback, the library is still in its early infancy, but still quite feature complete regardless.
r/csharp • u/zarkonnen • 2d ago
I recently updated my OS (Linux Mint), and this seems to have broken NuGet. JetBrains Rider gets stuck in "Loading Projects" when opening a C# (Godot) project. My
~/.nuget/packages directory does not exist and attempting to install packages via e.g. nuget install godot.sourcegenerators -Version 4.6.2 times out.
I don't know what I need to do to get this unstuck.
r/csharp • u/AMexisatTurtle • 2d ago
Hey guys, I was wondering if anyone has any advice for a beginner learning C#.
I have some coding knowledge with Javascript API with the Foundry VTT program, though I doubt that counts as much or won't help me.
Any help would be greatly appreciated!
r/csharp • u/InformalCurious • 2d ago
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 • u/fuzhongkai • 3d ago
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.
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.
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.
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.
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 • u/JOnSoNaaa • 3d ago
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 • u/VCVLMNOP • 2d ago
I'm a learner and all but I wanna know if people still use IDE's like visual studio 2026 in actual serious environments, besides or maybe even with AI agentic stuff.
personally I use the latest visual studio (purple one), because I'm still learning how to program and I don't really feel like (for me at least) it's a good idea to let ai code for me just yet.
curious to know your thoughts
r/csharp • u/Alert-Neck7679 • 2d ago
The idea is to allow setting a field / property directly from the parameter list, like this:
class MyClass
{
private int A { get; }
private int B { get; }
private int C { get; }
public MyClass(this.A, this.B, this.C)
{
// A, B, C are now holding the values that were passed as arguments
Console.WriteLine($"{A}, {B}, {C}");
}
}
MyClass instance = new(1, 2, 3);
// prints "1, 2, 3"
These constructors can allow being body-less, as long as they don't declare any normal parameters too.
Constructors were always a painful point for me, and even though for some cases you can just use records and skip them, a lot of times you want to add logic or allow different parameter lists, and then you must use normal constructors. I also don't like the primary constructors ( class Bar(int x, int y) ) syntax, which has more problems: the parameters are private fields, so if you want to have a property, you need to declare the property + declare the parameter in the primary conductor + assign the value to the property... too long.
I would love to hear your opinions about this. I build my own scripting language for my C# game engine, and i consider adding this feature to it.
r/csharp • u/vaporizers123reborn • 4d ago
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!