Home / CSE MCQs / C#.Net MCQs :: Discussion

Discussion :: C#.Net MCQs

  1. What does the following code block define?

     class Gen {  
                      T ob;    
                  }
  2. A.
    Generics class decleration
    B.
    Decleration of variable
    C.
    a simple class decleration
    D.
    Both a & b

    View Answer

    Workspace

    Answer : Option 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'.


Be The First To Comment