public Foo() : base()       // calls the public partial Foo_Impl's construtor
    {
        Console.WriteLine(" called from Foo()");
        Foo_Impl myFoo_Impl = new Foo_Impl();          // calls the private partial Foo_Imp's constructor

        Console.WriteLine(" called from Foo()");
        Console.WriteLine("private Foo_Impl's variabe thats only accessible to Foo: {0}",
                          myFoo_Impl.fooAccessibleVariable);
    }
Esempio n. 2
0
 public Voyeur()
 {
     Foo_Impl fi =
         new Foo_Impl();        //Error: 'Foo_Impl.Foo_Impl()' is inaccessible due to its protection level   }
 }