static void Main(string[] args) { // git test ClassLibraryA objClassLibraryA = new ClassLibraryA(); objClassLibraryA.MethodBinLibrary(); A objectA = new A(); //objectA.x error objectA.methodA(); objectA.methodE(); A objectB = new B(); objectB.methodA(); objectB.methodC(); //objectB.methodD(); //error because protected status objectB.methodE(); B objectB2 = new B(10); EventHandler mainHandler = new EventHandler(); EventSubscriber eventSubscriber = new EventSubscriber(); eventSubscriber.Subscribe(mainHandler); mainHandler.Start(); LamdaClass lamdaClass = new LamdaClass(); lamdaClass.LamdaMehtod(lamdaClass.myMethod); A objA = new A(); objA.someNumber = 20; objA.SetToNull(ref objA); Console.WriteLine(objA == null); Console.WriteLine("singleton first {0}", SingleTon.SingleTonObject.GetHashCode()); Console.WriteLine("singleton second {0}", SingleTon.SingleTonObject.GetHashCode()); Car objCar = new Car(); objCar.SetTires(); Console.WriteLine("Car tires : {0}", objCar.NumberofTires); Truck objTruck = new Truck(); objTruck.SetTires(); Console.WriteLine("Truck tires : {0}", objTruck.NumberofTires); MyExetentionMethodClass myExetentionMethodClass = new MyExetentionMethodClass(); myExetentionMethodClass.NewMethod(); CodingProblemJan2020(); Console.ReadLine(); }
public static void NewMethod(this MyExetentionMethodClass obj) { Console.WriteLine("Extention method"); }