FIND YOUR NEXT FEW LINES
The snippet library.
Small, practical examples. Search by task or narrow things down below.
5 snippets foundClear filters
Add calendar days
Use DateOnly for a date without a time zone in C#.
C#✓ Tested
Format a decimal amount
Use invariant culture to print a C# decimal with two places.
C#✓ Tested
Read a JSON property
Parse a JSON document and dispose it after reading in C#.
C#✓ Tested
Serialize an object to JSON
Serialize a small anonymous C# object with System.Text.Json.
C#✓ Tested
Sum integer values
Sum a C# sequence using LINQ.
C#✓ Tested