Пример #1
0
        public static void Main()
        {
            System.Console.WriteLine("DemoClass");

            OuterClass oc = new OuterClass();

            OuterClass.NestedClass reference = oc.CreateObjectOfNestedClass();
        }
Пример #2
0
        internal static void NestedClass()
        {
            //throw new NotImplementedException();
            new OuterClass().Execute();

            // ALL CLASS MEMBERS ARE PRIVATE BY DEFAULT.
            //NestedClass nested = new NestedClass();


            OuterClass outer = new OuterClass();

            // MUST FULLY QUALIFY FROM OUTER TO ACCESS NESTED.
            OuterClass.NestedClass nested = outer.CreateObjectOfNestedClass();
            nested.Execute();
        }