1. | Which of the following statements is valid about advantages of generics?
|
|||||||||
Answer: Option C Explanation: No answer description available for this question. Let us discuss.
|
2. | For the code snippet given below, which of the following statements are valid? public class MyContainer<T> where T: class, IComparable 1 Class MyContainer requires that it's type argument must implement IComparable interface. 2 Compiler will report an error for this block of code. 3 There are multiple constraints on type argument to MyContainer class. 4 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. Let us discuss.
|
3. | For the code snippet given below, which of the following statements are valid? public class MyContainer<T> where T: IComparabte 1 Class MyContainer requires that it's type argument must implement IComparabte interface. 2 Type argument of class MyContainer must be IComparabte. 3 Compiler will report an error for this block of code. 4 This requirement on type argument is called as constraint. |
|||||||||
Answer: Option C Explanation: No answer description available for this question. Let us discuss.
|
4. | For the code snippet given below, which of the following statements is valid? public class Generic<T> |
|||||||||
Answer: Option A Explanation: No answer description available for this question. Let us discuss.
|
5. | For the code snippet shown below, which of the following statements are valid? public class TestIndiaBix |
|||||||||
Answer: Option A Explanation: No answer description available for this question. Let us discuss.
|
6. | Which of the following statements is valid about generic procedures in C#.NET?
|
|||||||||
Answer: Option D Explanation: No answer description available for this question. Let us discuss.
|
7. | Which of the following statements are valid about generics in .NET Framework? 1 Generics is a language feature. 2 We can create a generic class, however, we cannot create a generic interface in C#.NET. 3 Generics delegates are not allowed in C#.NET. 4 Generics are useful in collection classes in .NET framework. 5 None of the above
|
|||||||||
Answer: Option C Explanation: No answer description available for this question. Let us discuss.
|
8. | For the code snippet shown below, which of the following statements are valid? public class Generic<T> |
|||||||||
Answer: Option D Explanation: No answer description available for this question. Let us discuss.
|