using System.Collections.Generic;
namespace ConsoleApplication9
Console.WriteLine("enter the name of c");
cname = Console.ReadLine();
Console.WriteLine("enter the id of c");
cid = int.Parse(Console.ReadLine());
public override void cdata()
Console.WriteLine("enter the name of A");
aname = Console.ReadLine();
Console.WriteLine("enter the id of A");
aid = int.Parse(Console.ReadLine());
public override void bdata()
Console.WriteLine("enter the name of C");
bname = Console.ReadLine();
Console.WriteLine("enter the id of C");
bid = int.Parse(Console.ReadLine());
Console.WriteLine("Enter the C name " + cname + "Enter the ID of C : " + cid + "\nEnter the B name: " + bname + " Enter the ID of B : " + bid + "\nEnter the A name : " + aname + "Enter the ID of A : " + aid);
public abstract void bdata();
public abstract class C : B
public abstract void cdata();
public static void Main(string[] args)