Examveda

What will be the output of the following C# code?
public static void Main(string[] args)
{
    int i = 123;
    object o = i;
    i = 456;
    System. Console. WriteLine("The value-type value = {0}", i);
    System. Console. WriteLine("The object-type value = {0}", o);
    Console. ReadLine();
}

A. 123, 123

B. 456, 123

C. 456, 456

D. 123, 456

Answer: Option B


Join The Discussion

Related Questions on Basic Syntax and Data Types in C Sharp