Z
Zoltan Hernyak
Hi,
see my classes:
public class One
{
public One(string s) { .... }
}
public class Two:One
{
public class Two(int x)
{
...
}
}
what if I have to make some preparation before call the "base"
constructor from Two? for example:
public class Two(int x)
{
string s = String.Format("Your int was {0}",x);
base(s); // this is not working !!!!
}
So, the question is: how can I call the base constructor if
I can't call using the ":base( )" syntax. Is there any other
possibility to call the base constructor INSIDE the descendant
class' constructor?
aroan
see my classes:
public class One
{
public One(string s) { .... }
}
public class Two:One
{
public class Two(int x)
{
...
}
}
what if I have to make some preparation before call the "base"
constructor from Two? for example:
public class Two(int x)
{
string s = String.Format("Your int was {0}",x);
base(s); // this is not working !!!!
}
So, the question is: how can I call the base constructor if
I can't call using the ":base( )" syntax. Is there any other
possibility to call the base constructor INSIDE the descendant
class' constructor?
aroan