Nguyễn Tuấn Dương
New member
What will be the output of the following C# code?
A. 10, 10
B. 0, 10
C.
D. 8, 8
Code:
class maths
{
static maths()
{
int s = 8;
Console.WriteLine(s);
}
public maths(int f)
{
int h = 10;
Console.WriteLine(h);
}
}
class Program
{
static void Main(string[] args)
{
maths p = new maths(0);
Console.ReadLine();
}
}
B. 0, 10
C.
Code:
8, 10