C# Code Examples RSS feed
Learn C# and .NET one idea at a time. Every code example is short, runnable, and shows its output, so you can copy it, try it, and share the tip.
-
#016 C# 8 The ^ index operator
-
#015 C# 8 Range operator
-
#014 C# 8 Assign if null with ??=
-
#013 C# 7 Tuples and deconstruction
-
#012 C# 6 using static
-
#011 .NET Framework 4 string.Join
-
#010 C# 8 Switch expressions
-
#009 .NET 9 Sum per group with AggregateBy
-
#008 C# 6 Culture-aware interpolation
-
#007 C# 2 Method groups in LINQ
-
#006 C# 3 Chain lambdas on one delegate
-
#005 C# 15 Union types in C# 15
-
#004 C# 9 Copy a record, change one thing
-
#003 C# 7 Make big numbers readable
-
#002 C# 6 Filter exceptions with when
-
#001 C# 12 Flatten a collection of collections