static void Main(string[] args) { InnerVsOuter outerClass = new InnerVsOuter("outer"); NestedClass nestedClass = new InnerVsOuter.NestedClass( outerClass, "nested"); nestedClass.PrintNames(); Console.ReadLine(); }
public NestedClass(InnerVsOuter parent, string name) { this.parent = parent; this.name = name; }