harry code

harry code

  • 2k
  • 124
  • 16.7k

Passing parameters for multiple constructors usng single obj

Mar 12 2018 5:13 AM
Hi,
I want to pass parameters to multiple constructors of different class with the help of a single instance of child class.Can i call them???
My code looks like this:
 
 
class parent1
{
public parent1()
{
}
}
 
class parent2
{
public parent2():parent1
{
}
}
 
class parent3:parent2
{
public parent3()
{
}
}
 
class child
{
static void Main()
{
 child c=new child(10,20,30);
 

Answers (1)