1.

Which statement is valid for the given snippet of code:
 public class Generic { public T Field; } class Program { static void Main(string[] args) { Generic g = new Generic(); g.Field = "Hi"; Console.WriteLine(g.Field); } }

A. Compile time error
B. Generic being a keyword cannot be used as a class name
C. Run time error
D. Code runs successfully
Answer» E.


Discussion

No Comment Found