// 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 DotnetVersusJava { public enum Fruits { Apples, Oranges, Grape }; public enum Cars { Ford, Toyota, Mercedes }; public enum Colors { Red, Green, Blue }; public class TestClass { public static void Main(string[] args) { Fruits fru = Fruits.Grape; Cars car = Cars.Mercedes; Colors col = (Colors)((int)fru / (int)car); Console.WriteLine(col); } } }