Essential C# Enum  Suggest an edit

Get all the members values of an enum

enum MyEnum
{
    One,
    Two,
    Three
}

foreach(MyEnum e in Enum.GetValues(typeof(MyEnum)))
Console.WriteLine(e);

This will print:

One
Two
Three


Table Of Contents
22 Enum
25 GUID
107 Stream
108 Timers
  ↑ ↓ to navigate     ↵ to select     Esc to close