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:
C#
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);
}
}
harry code125 pointsPosted Mar 12, 2018, 1:29 AM EDT
class parent1 { public parent1(int a) { } } class parent2 { public parent2(int b):parent1 { } } class parent3:parent2 { public parent3(int c) { } } class child:parent3 { static void Main() { child c=new child(10,20,30); } }