public static void Main() { Outer.Inner inobj = new Outer.Inner(); //inobj.ShowOuter(); inobj.ShowInner(); Outer outobj = new Outer(); outobj.ShowOuter(); //outobj.ShowInner(); }
public static void Main() { Console.WriteLine("InnerClasses Test!"); Outer outer = new Outer(); Outer.Inner inner = outer.CreateInner(45); if (inner.var != 45) { throw new System.InvalidOperationException("Inner value should be initially 45"); } outer.UseInner(inner); if (inner.var != 145) { throw new System.InvalidOperationException("Inner value should be 145 after UseInner()"); } }
static void Main(string[] args) { Outer o = new Outer(1); Outer.Inner i = new Outer.Inner(1); }
static void Main(string[] args) { Outer t1 = new Outer(); Outer.Inner t2 = new Outer.Inner(); }