Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            OuterClass outer = new OuterClass(10);

            OuterClass.InnerClass inner  = new OuterClass.InnerClass();
            OuterClass.InnerClass inner2 = new OuterClass.InnerClass(outer);
            outer.DisplaySelf();
            inner.DisplaySelf();
            Console.WriteLine($"Outer adding Inner Class Fields result: {outer.AddInnerClassFields()}");
            Console.WriteLine($"Inner adding Outer Class Fields result: {inner.AddOuterClassFields()}");
            Console.ReadLine();
        }
Ejemplo n.º 2
0
 public InnerClass(OuterClass outer)
 {
     this.outer = outer;
 }