Seshadri M

Seshadri M

  • NA
  • 69
  • 18.1k

Class Inheritance

Jun 2 2017 3:24 AM

class Baseclass
{
int i;
public Baseclass(int ii)
{
i = ii;
Console.Write("Base \n");
}
}
class Derived : Baseclass
{
public Derived(int ii)
{
Console.Write("Derived \n");
}
}
class MyProgram
{
static void Main(string[ ] args)
{
Derived d = new Derived(10);
}
}
 
I am getting output as Derived
but i need to get output 
 
Base
Derived 


Answers (2)