// Collection of code snippets by Arne Vajhøj // (from articles on eksperten.dk / vajhoej.dk written sometime between 2004 and now) using System; namespace E { public class Data { public int A { get; set; } private int _b; public int B { get { return _b; } } public Data() { A = 123; _b = 456; } } public class Programs { public static void Main(string[] args) { Data o = new Data(); Console.WriteLine(o.A + " " + o.B); } } }