Which of the lines will cause a compile error?
 
1)Type t1 = typeof(System.Int32); 
2)Type t2 = Type.GetType("System.Int32"); 
3)Type t3 = Type.GetType(System.Int32); 
4)Type t4 = System.Int32.GetType();
 
Explanation
Type has method GetType, which takes as a parameter String. And each type of the CLR has a method GetType, but without parameters.
C#
C# Quiz
Learn C# Online

or Read more about C# Quiz

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback