how to reference an enum in c# code example
Example 1: enumeratio nc sharp
enum Products
{
Apple = 0,
Milk = 1,
Vodka = 2,
}
Console.Writeline(Products.Milk); // Output = Milk
Console.Writeline((int)Products.Milk); // Output = 1
Example 2: public enum c#
enum Season
{
Spring,
Summer,
Autumn,
Winter
}