public void Enums() { pastryType myPastry = pastryType.Baguette; pastryType myPastry2 = pastryType.Cake; Console.WriteLine((int)myPastry); //(int) is call casting. converts one type to another, but only certain will work Console.WriteLine(myPastry2); //in enum, every type has a value in it. Hover over pastry types to see them }
public void Enums() { pastryType myPastry = pastryType.Doughnut; pastryType anotherPastry = pastryType.Croissant; Console.WriteLine(myPastry); Console.WriteLine(anotherPastry); }