// 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; public abstract class Thing { public abstract void method(); } public class DerivedThing : Thing { public override void method() { // nothing } } public class MainClass { private const int N = 1000000000; public static void Main(string[] args) { Thing t = new DerivedThing(); DateTime t1 = DateTime.Now; for(int i = 0; i < N; i++) { t.method(); } DateTime t2 = DateTime.Now; Console.WriteLine((t2 - t1).TotalSeconds); } }