Discussion :: Generics
-
For the code snippet given below, which of the following statements are valid?
public class MyContainer
where T: class, IComparable { //Insert code here } - Class MyContainer requires that it's type argument must implement IComparable interface.
- Compiler will report an error for this block of code.
- There are multiple constraints on type argument to MyContainer class.
- Class MyContainer requires that its type argument must be a reference type and it must implement Icomparable interface.
Answer : Option B
Explanation :
No answer description available for this question.
Be The First To Comment