How to Use Enum in C#: Declaration, Values, and Best Practices
Learn how to use enum in C# from scratch. Covers declaring enums, assigning values, casting, comparing, iterating, and the best practices every C# developer should follow.
C# and .NET by Nick Cosentino
Practical, in-depth content for software engineers and technical leaders. Learn C#, .NET, software architecture, AI-assisted development, and engineering leadership with guidance you can apply on your team today.

The latest articles on software engineering, architecture, AI, and career growth.
Learn how to use enum in C# from scratch. Covers declaring enums, assigning values, casting, comparing, iterating, and the best practices every C# developer should follow.
Compare state vs strategy pattern in C# with side-by-side code examples, key behavioral differences, and guidance on when to use each.

Welcome to another issue of Dev Leader Weekly! In this issue, I discuss the shifting landscape of AI-related career fears -- from being replaced to being left behind -- and how developers can navigate the change.
Master C# enum with this complete guide. Learn to declare enums, use flags, convert to string, apply switch pattern matching, and follow .NET best practices.
Go deeper into the core topics on Dev Leader, from .NET and AI to software engineering and career growth.