What will be the output of the following C# code snippet?
class A
{
int i;
int j;
public A()
{
i = 1;
j = 2;
}
}
class Program
{
static void Main(string[] args)
{
A obj1 = new A();
Console.WriteLine(obj1.ToString());
Console.ReadLine();
}
}
class A
{
int i;
int j;
public A()
{
i = 1;
j = 2;
}
}
class Program
{
static void Main(string[] args)
{
A obj1 = new A();
Console.WriteLine(obj1.ToString());
Console.ReadLine();
}
}
A. True
B. False
C. String associated with obj1
D. Compile time error
Answer: Option C
Join The Discussion