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

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

or Read more about C# Quiz

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback