C# Performance Optimization
Profiling before guessing, then the fixes that pay: allocations, LINQ in hot paths, string building, Span, async correctness and database queries.
Try: python lists, javascript functions, syntax error, first project
C# fundamentals in plain English — types, collections, LINQ and the language features that make everyday code shorter.
16 guides
Profiling before guessing, then the fixes that pay: allocations, LINQ in hot paths, string building, Span, async correctness and database queries.
What C# is, what .NET provides, where the language is used, and your first program — plus how it compares with Java,…
What a delegate is, how events build on them, Action and Func, and the two mistakes that cause memory leaks and null…
The design patterns that earn their place in C#: strategy, factory, repository, decorator, observer and options — with the language features that…
Events that never fire, fire twice, or stop after a while. The causes: it fell out of scope, EnableRaisingEvents is false, the…
Distinct removes duplicates by equality, and for classes equality means the same instance. Three fixes: DistinctBy, a record, or IEquatable, and which…
Extension members let you add properties, static members and operators to types you do not own, not just methods. The new extension…
Generic classes, methods and constraints in C#, why the generic List beats ArrayList, and the variance keywords in and out explained plainly.
Writing unit tests in C# with xUnit: arrange-act-assert, parameterised tests, mocking dependencies, and what is actually worth testing.
Unhandled exceptions should become consistent, safe JSON responses. The built-in exception handler, ProblemDetails, custom exception mapping and what to log, with working…
How to publish a .NET application: framework-dependent versus self-contained builds, single-file output, trimming, Docker and configuration for production.
Related topics
The fastest way to improve is to read one guide, then build the thing it describes. Start with the basics, or jump straight to a project.