Limiting generic types in C#

Viewed 4942

I have a generic class MyClass<T> where T should only be those types which can be compared.

This would mean only numeric types and classes where methods for the relational operators have been defined. How do I do this ?

4 Answers
Related