What will be the result of a following code execution?
 
namespace ConsoleApplication1 
{ 
     class Program 
     { 
         static void Main(string[] args) 
         {
             string @string = "ABC";   
             Console.WriteLine(string); 

             Console.ReadLine(); 
         } 
     }
}
 
Explanation
In Console.WriteLine statement we try to print a type instead of a local variable. In order to print the local variable, it should be called in the following way: @string.

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback
Cosmo
Sign Up Now
or Subscribe for future quizzes