public void method2() { // Console.WriteLine("Inner Class Method"); Outer ob = new Outer(); Console.WriteLine(ob.num); }
static void Main() { Outer obj1 = new Outer(); obj1.method1(); Outer.Inner obj2 = new Outer.Inner(); obj2.method2(); }