Ejemplo n.º 1
0
        static void Main()
        {
            //calling the methods of the class "program" by creating an instance of it instead of inheriting it
            baseClass proObj = new baseClass();

            //all the possible methods that can be called

            proObj.internalMethod();
            proObj.PublicMethod();
            proObj.ProtectedInternalMethod();

            // methods except private protected can be called
        }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            baseClass obj = new baseClass();

            //all possible methods that can be called

            obj.internalMethod();
            obj.PrivateMethod();
            obj.ProtectedInternalMethod();
            obj.PublicMethod();
            obj.ProtectedMethod();
            //all the methods can be called

            Console.ReadLine();
        }