C# is a statically typed, object-oriented language from Microsoft that runs on .NET. Code compiles to intermediate language, which the Common Language Runtime turns into machine code at run time, and the runtime also manages memory through garbage collection. Teams use C# for web APIs, desktop and enterprise applications, services and tooling.

The posts here start with overviews of what C# is, how the .NET architecture works and where the language fits, along with an introduction to LINQ for querying collections, XML and databases. From there it moves to hands-on .NET performance labs: runnable console demos comparing Task with ValueTask, Substring with Span<T>, a garbage collection walkthrough covering Gen0, Gen1 and Gen2 with dotnet-counters, and a minimal API lab that contrasts threading anti-patterns such as .Result and Thread.Sleep with proper async/await. A complete BenchmarkDotNet tutorial shows how to measure and compare code paths.

There are also older troubleshooting write-ups on Windows Installer packaging for C# apps, covering mixed 32-bit and 64-bit assemblies and rollback cleanup, plus a set of 50 interview questions. The material suits developers learning C#, engineers tuning .NET services, and build and release engineers who package .NET software.

Start here

Latest C# articles

DOTNET: Memory Optimization in .NET with ValueTask

Here’s a single, self-contained console app that lets you experience the difference between: You’ll see timing + GC stats for both in the same run. 1️⃣ Full…

Read More

DOTNET: Memory Optimization in .NET with Span

This is a perfect demo topic. Here’s a single, self-contained console app that lets you feel the difference between: You’ll get timing + GC stats for both…

Read More

Benchmarking & BenchmarkDotNet – The Ultimate Complete Tutorial

1. What Are Benchmarks? A benchmark is a controlled, repeatable experiment that measures the performance characteristics of a piece of code. A good benchmark answers questions like:…

Read More

DOTNET: Threading Design Example threading anti-patternsm, proper async/await & concurrency behavior

We can do this with one self-contained minimal API that has: 1️⃣ Create the project Replace all contents of Program.cs with this: This single file gives you:…

Read More

DOTNET: Understanding Garbage Collection with Gen0, Gen1, Gen2

Yes, we can absolutely do this in one self-contained program 👍You’ll be able to: Below is a single Program.cs you can drop into a new console app….

Read More

What is LINQ and use cases of LINQ?

What is LINQ? LINQ, or Language-Integrated Query, is a feature of Microsoft’s .NET framework that enables developers to write queries directly within the programming language (C# or…

Read More

What is C# and use cases of C#?

What is C#? C# is a modern, multi-paradigm programming language designed by Microsoft. It is widely used for developing various types of applications on the .NET Framework,…

Read More

What is C# and How it works? An Overview and Its Use Cases?

What is C#? C# is a modern, general-purpose programming language that can be used to perform a wide range of tasks and objectives that span over a…

Read More

Top 50 C# Interview Questions and Answers

What is C#? C# is an object-oriented, modern programming language that was created by Microsoft. It runs on the .NET Framework. C# is very close to C/C++…

Read More

Multi-process C# app like Google Chrome

InstallerExpert created the topic: Multi-process C# app like Google Chrome 2 months ago we released wyBuild & wyUpdate v2.5. This release adds a free automatic updater control…

Read More

32 and 64 bit assemblies in one windows installer

rajeshkumar created the topic: 32 and 64 bit assemblies in one windows installer 4 vote down star Hello, I have an application written in C# which depends…

Read More

Windows Installer Rollback install directory files cleanup problem

rajeshkumar created the topic: Windows Installer Rollback install directory files cleanup problem am facing problem in Windows Installer Rollback functionality using C#.net 2.0. I have created an…

Read More

C#: frequently asked questions

What is the difference between C# and .NET?

C# is a programming language, while .NET is the platform that compiles and runs it, providing the runtime, garbage collector and base class libraries. Other languages such as F# and VB.NET also run on .NET.

When should I use ValueTask instead of Task?

ValueTask helps when an async method usually completes synchronously, such as returning a cached result, because it can avoid a heap allocation. For most code Task remains the simpler default, and a ValueTask should normally be awaited only once.

What are Gen0, Gen1 and Gen2 in .NET garbage collection?

They are generations of the managed heap. New objects start in Gen0, objects that survive a collection are promoted to Gen1 and then Gen2. Gen0 collections are frequent and cheap, and Gen2 collections are less frequent and more expensive.

Why is calling .Result on a task considered an anti-pattern?

It blocks the calling thread until the task finishes, which wastes thread pool threads under load and can cause deadlocks in some synchronization contexts. Using await keeps the thread free while the operation completes.