D
Dhananjaya.R
Hi,
What will be the constructor flow of control for the below snippet. I had an
hard time understanding how C# can allow initialization of member variables
in class declaration.
public class Base {
public int x = a( );
public Base( ) { b( ); }
}
public class D1: Base {
public int y = c( );
public D1( ) { d( ); }
}
public class D2 : D1 {
public int z = e( );
public D2( ) { f( ); }
}
public class D3 : D2 {
public int w = g( );
public D3( ) { h( ); }
}
What will be the constructor flow of control for the below snippet. I had an
hard time understanding how C# can allow initialization of member variables
in class declaration.
public class Base {
public int x = a( );
public Base( ) { b( ); }
}
public class D1: Base {
public int y = c( );
public D1( ) { d( ); }
}
public class D2 : D1 {
public int z = e( );
public D2( ) { f( ); }
}
public class D3 : D2 {
public int w = g( );
public D3( ) { h( ); }
}