Q67
Which statement is valid for the following C# code snippet? 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.
Runtime error
D.
Code runs successfully
AnswerAnswer: Option D
Solution
Answer: Option D
No explanation is given for this question Let's Discuss on Board