Profile picture
BrandGhost

Older Posts

C# Enum Switch: Pattern Matching and Exhaustive Checks

C# Enum Switch: Pattern Matching and Exhaustive Checks

Learn how to use C# enum with switch expressions and pattern matching. Covers exhaustive checks, discard arms, tuple patterns, guard clauses, and compiler warnings.

Read the whole article

C# Enum to String: Conversion Patterns and Best Practices

C# Enum to String: Conversion Patterns and Best Practices

Learn every C# enum to string conversion pattern: ToString, Enum.GetName, JsonStringEnumConverter, custom display names, and parsing strings back to enums safely.

Read the whole article

An error has occurred. This application may no longer respond until reloaded. Reload