Exemple #1
0
        public void MyMethod()
        {
            Console.WriteLine("Method one with internal class");
            PublicBaseClassAssemblyOne cl1 = new PublicBaseClassAssemblyOne();

            cl1._myinternal        = 1000; //Internal type is available since it is in same assembly
            cl1._protectedinternal = 10;   // protected internal is available
            cl1._myPublic          = 2;    // Public OK
            //cl1.myPrivate = ?? // nor available since it is private

            DerivedClassAssemblyOne drOne = new DerivedClassAssemblyOne();

            drOne._myinternal        = 30; // Internal and available from derived class
            drOne._myPublic          = 1;  // Public
            drOne._protectedinternal = 2;  // Able to be accessed from same assembly or derived class from other assembly
        }
        public ClassAssembly2()
        {
            PublicBaseClassAssemblyOne classfromOtherAssembly = new PublicBaseClassAssemblyOne();

            classfromOtherAssembly._myPublic = 0;     //Only public is available
        }