Exemplo n.º 1
0
        static void Main(string[] args)
        {
            AccessSpecifierCase1 case3 = new AccessSpecifierCase1();

            // case3.Test1(); Private member is not accessible from non child class
            case3.Test2();
            //  case3.Test3(); Protected member is also not accessible from non child class
            case3.Test4();
            case3.Test5();
        }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            AccessSpecifierCase1 case1 = new AccessSpecifierCase1();

            case1.Test1();
            case1.Test2();
            case1.Test3();
            case1.Test4();
            case1.Test5();

            // Under same class all access specifiers are accessible
        }