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.

Слідкуй за CodeGalaxy

Мобільний додаток Beta

Get it on Google Play
Зворотній Зв’язок
Cosmo
Зареєструйся Зараз
або Підпишись на майбутні тести