// 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 abstract class BC { public void M() { Console.WriteLine(S); } public abstract string S { get; } // a concrete sub class will have S } public class C : BC { private string s; public C(string s) { this.s = s; } public override string S // here it is { get { return s; } } } public class Program { public static void Main(string[] args) { C o = new C("ABC"); o.M(); } } }