how to use enumeration 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: enum in c#
enum Itemtype
{
Use,
Loot,
Equip,
ETC
};