Hi,
I've found this question in a 70-535 (.net framework development foundation test) training book. The correct answer is D), but I don't know why, or how could I use these constrains...
You are creating a generic class, and you need to dispose of the generic objects. How can you do this?
A) Call the Object.Dispose Method
B) Implement the Idisposable Interface
C) Derive the generic class from the Idisposable class
D) Use constraints to require the generic type to implement IDisposable interface
Thanks
Blog de desarrollo / Development blog