C# by Examples

Practical C# code snippets: short, copy-paste ready, and organized by topic.

1 min read

C# DateTime.ToString Format Cookbook

Copy-paste C# DateTime.ToString format examples for yyyy-MM-dd, ISO 8601, logs, filenames, UTC, and localized output.

1 min read

C# GUID Parse and Format Reference

Learn how to parse GUIDs with Guid.Parse and Guid.TryParse, format them with N, D, B, P, and X, and normalize values for storage or display.