The default for an enum
(in fact, any value type) is 0 — even if that is not a valid value for that enum
. It cannot be changed.
More Related Contents:
- How to enumerate an enum
- Enum “Inheritance”
- Get Enum from Description attribute [duplicate]
- Anyone know a good workaround for the lack of an enum generic constraint?
- How to loop through all enum values in C#? [duplicate]
- Most common C# bitwise operations on enums
- Enum type constraints in C# [duplicate]
- Get enum from enum attribute
- Why switch for enum accepts implicit conversion to 0 but no for any other integer?
- How do I convert an enum to a list in C#? [duplicate]
- Why enums require an explicit cast to int type?
- How to Compare Flags in C#?
- How to convert a character in to equivalent System.Windows.Input.Key Enum value?
- Parse string to enum type
- What is the default value for enum variable?
- How to prevent duplicate values in enum?
- .NET Enumeration allows comma in the last field
- C# int, Int32 and enums
- Binding an enum to a WinForms combo box, and then setting it
- Total number of items defined in an enum
- How to get next (or previous) enum value in C#
- How to add extension methods to Enums
- Why Enum’s HasFlag method need boxing?
- Can you have multiple enum values for the same integer? [duplicate]
- No output to console from a WPF application?
- How can I make the cursor turn to the wait cursor?
- Using a 32bit or 64bit dll in C# DllImport
- How to create trial version of .NET software? [closed]
- Why doesn’t Mutex get released when disposed?
- Can I use Linq’s Except() with a lambda expression comparer?