// 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 class Demo { private static int si = 0; private int nsi = 0; public Demo() { si++; nsi++; } public void printNsi() { Console.WriteLine(nsi); } public static void printSi() { Console.WriteLine(si); } public static void Main() { Demo d1 = new Demo(); Demo d2 = new Demo(); d1.printNsi(); d2.printNsi(); Demo.printSi(); } }