All posts
Tagged “C#”
2 postsPattern Matching in Modern C#: Write Less, Express More
How switch expressions, property patterns and list patterns turn tangled if/else chains into code that reads like a spec.
Charan Pasham
Oct 12, 2026
Single file csharp execution
TL;DR: You can run a single C# file with dotnet run hello.cs—no project needed. It supports shebang (#!dotnet run), command-line args, and even works without the .cs extension. You can also import NuGet packages using #:package PackageName@version. Perfect for quick scripts.
Charan Pasham
Nov 19, 2025