98-372 · Question #55
Which of the following types of constraints can you apply to a generic? Each correct answer represents a complete solution. Choose all that apply.
The correct answer is B. Base classes C. Interfaces. There are four types of constraints that you can apply to generics, which are as follows: Making them a reference or value type Answer: D is incorrect. You do not need types to have a particular method or property in a Answer: A is incorrect. You cannot use name pattern matching
Question
Which of the following types of constraints can you apply to a generic? Each correct answer represents a complete solution. Choose all that apply.
Options
- AName pattern matching
- BBase classes
- CInterfaces
- DMethod
How the community answered
(43 responses)- A7% (3)
- B79% (34)
- D14% (6)
Explanation
There are four types of constraints that you can apply to generics, which are as follows: Making them a reference or value type Answer: D is incorrect. You do not need types to have a particular method or property in a Answer: A is incorrect. You cannot use name pattern matching in a generic constraint.
Topics
Community Discussion
No community discussion yet for this question.