Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors

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 Comment