public class A
{
public A()
{}
}
Public class B :A
{
public B()
{}
}
B b = new B();
What do you think? Will A constructor run before or B Constructor run?
It would be the base class constructor(A) that would be running before the child constructor(B). Not sure? Run the above code yourself and find out.
No comments:
Post a Comment