// Collection of code snippets by Arne Vajhøj // (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) using System; namespace EnumChk { enum Direction { North, South, West, East } enum Color { Red, Green, Blue, Yello } enum Material { Wood, Iron, Concrete } public class Program { public static void Main(string[] args) { Direction d = Direction.West; Color c = Color.Green; Material m = (Material)((int)d / (int)c); Console.WriteLine(m); Console.ReadKey(); } } }