What will be the Correct statement in the following C# code?
A. Compile time error
B.
b
a
C.
a
b
D. The program will work correctly if we replace base(a1) with base.baseclass(a1)
Code:
class baseclass
{
int a;
public baseclass(int a1)
{
a = a1;
console.writeline(" a ");
}
class derivedclass : baseclass
{
public derivedclass (int a1) : base(a1)
{
console.writeline(" b ");
}
}
class program
{
static void main(string[] args)
{
derivedclass d = new derivedclass(20);
}
}
}
B.
b
a
C.
a
b
D. The program will work correctly if we replace base(a1) with base.baseclass(a1)