What does the following C# code block define?

class Gen<T> {  
                  T ob;    

a) Generics class declaration
b) Declaration of variable
c) A simple class declaration
d) Both Generics class declaration & Declaration of variable

1 thought on “What does the following C# code block define?”

  1. d
    Explanation: class Gen This defines the generics declaration where ‘T’ is the name of type parameter. This parameter is used as a placeholder for the actual type that will be specified when a Gen object is created. Gen is a generic class. T is used to declare a variable called ‘ob’.

Leave a Comment