public static void Main(string[] args) { MyClass mc = new MyClass("test"); MyOtherClass moc = new MyOtherClass(); Test1.PrintCounterA(mc); Test1.PrintCounterB(mc); ClassA a = new ClassA(); ClassB b = new ClassB(); Test1.PrintCounterA(mc); Test1.PrintCounterB(mc); Test1.PrintName(mc); Test1.PrintName(moc); MyClass.DestroyObject(mc); Test1.PrintCounterA(mc); Test1.PrintCounterB(mc); MyClass.DestroyObject(moc); mc.PrintCounter(typeof(ClassA)); mc.PrintCounter(typeof(ClassB)); mc.PrintCounter(typeof(string)); mc.Print(2); (mc.Create("new MyClass") as MyClass).Print(); System.Console.Out.WriteLine(mc == ((MyClass)mc.Create("test"))); }