INHERITANCE

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication5
{
class Program
{
class FRUIT
{
public void DISP()
{
Console.WriteLine("I AM FRUIT CLASS");
}
}
class FRUIT1:FRUIT
{
public void DISPLAY1()
{
Console.WriteLine("I AM FRUIT1 CLASS");
}
}
static void Main(string[] args)
{
FRUIT FR=new FRUIT();
FR.DISP();
FRUIT1 F1=new FRUIT1();
F1.DISPLAY1();
F1.DISP();
Console.ReadKey();
}
}
}

No comments:

Post a Comment