Let say we have Class A and Class B. ClassB extends Class A. (ClassB : ClassA)
Now let\'s say that whenever I instantiate ClassB, I\'d like to Run some Random code and o
Another hack if you can get away with calling a static method.
public class ClassA
{
public ClassA()
{
Debug.WriteLine("Call A Constructor");
}
}
public class ClassB:ClassA
{
public ClassB():this(aMethod())
{
}
private ClassB(object empty):base()
{
Debug.WriteLine("Class B Second Constructor");
}
private static object aMethod()
{
Debug.WriteLine("Run me First");
return null;
}
}