Examveda

In the following C# code, which of the following statement is not correct?
public class MyContainer<T> where T: class, IComparable
{
  /* insert code here */
}

A. Class MyContainer requires that its type argument must implement Icomparable interface

B. There are multiple constraints on type argument to MyContainer class

C. Class MyContainer requires that its type argument must be a reference type (class)

D. Compiler will report an error

Answer: Option D


Join The Discussion

Related Questions on Delegates and Events in C Sharp