Select from following answers:- 44,mystring
- run time error
- 44
- complie time error
- All Above
With the generic class List<T>, the generic type T defines what types are allowed. With a definition of List<int>, only integer types can be added to the collection. The compiler doesn’t compile this code because the Add() method has invalid arguments:
Show Correct Answer
Asked In: Many Interviews |
Alert Moderator