// 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 E { public enum Indx { A, B, C } public class Data { public static Data A = new Data('A'); public static Data B = new Data('B'); public static Data C = new Data('C'); private char c; public Data(char c) { this.c = c; } public override string ToString() { return c.ToString(); } } public class Program { public static void Main(string[] args) { Indx ve; ve = Indx.B; Console.WriteLine(Indx.B); Console.WriteLine(ve); Data vc; vc = Data.B; Console.WriteLine(Data.B); Console.WriteLine(vc); } } }