class A
{
int p = 8;
}
class B : A
{
int q = 9;
public B() { Q++; }
}
class Program
{
static void Main(string[] args)
{
B b = new B();
}
}
In this code what order do things happen?
1 - Initialize class B q field to default value (zero)
2 - Initialize class A p field to default value (zero)
3 - Placing the value 9 in class B q field
4 - Placing the value 8 in class A p field
5 - calling to class A constructor
6 - the command q++ in the class B constructor
In what order it works?
options:
(a) 1-5-2-4-3-6
(b) 1-3-5-2-4-6
Sorry for the bad English, hope the question can be understood.
Thanks