Generics Questions and Answers

Practice Mode
Showing 10 of 32 questions
Q31
Which constraint allows multiple interface implementations?
  • A where T : I1, I2
  • B where T : I1 + I2
  • C where T : I1 and I2
  • D where T : I1 | I2
Answer: Option A
Explanation: Multiple interface constraints can be specified using the where clause.
Q32
What is a generic delegate?
  • A A delegate that can handle any type
  • B A delegate with type parameters
  • C A delegate for generic classes only
  • D A delegate that uses dynamic types
Answer: Option B
Explanation: Generic delegates can work with different types while maintaining type safety.
Questions and Answers for Competitive Exams Various Entrance Test