Question:What will be the output of the following Main program in a C# console application (Assume required namespaces are included)?
static void Main(string[] args)
{
string sPrint = String.Format("{{ My name is bond. }}");
Console.WriteLine(sPrint);
Console.ReadLine();
}
 

A {{ My name is bond. }} 

B It will throw a compilation error. 

C { My name is bond. } 

D It will throw a runtime error. 

+ Answer
+ Report
Total Preview: 812

Copyright © 2024. Powered by Intellect Software Ltd