Search your topic here

Implement Inheritance in C#

PRINCIPLES OF PROGRAMMING LANGUAGES
PRACT. Implement inheritance in C#.

using System;

namespace ATC
{
    class CSE
    {
        public int age = 22;
    }

    class Child : CSE 
    {
        static void Main(string[] args)
        {
            Child obj = new Child();
            Console.WriteLine("{0}", obj.age);
            Console.ReadKey();
        }
    }
}

LEAVE A REPLY