C# Enumeration
Last modified: July 11, 2021An enumeration is a set of named integer constants.
enum Warning_level
{
High, // 0
Medium, // 1
Low, // 2
}
static void Main(string[] args)
{
var highWarning = Warning_level.High;
var index = (int)Warning_level.High;
}