What will happen if the following code is compiled in .NET 4 or above (Assume required namespaces are included)?
public class var { }
public class main
{
public static void main(string[] args)
{
var testVar = new var();
}
}
Correct Answer: This code will compile, as var is merely a contextual keyword and it is used to provide a specific meaning in the code, so it will cause no problems.
Explanation:
Note: This Question is unanswered, help us to find answer for this one
More C# MCQ Questions