System.IComparable<T>

T

Tony Johansson

Hello!¨

I read a book and here it says that it's most often an advantage to
implement the generic interface IComparable<T>
instead of the general interface IComparable. This is correct!

Now to my question this book also say that both interfaces can be
implemented something that some of the types in .NET does.

I can't see any point in implementing both interfaces?? Can you ??

//Tony
 
M

Marc Gravell

Yes; it means that anything that doesn't know about the generic side
(ArrayList, or a data-grid) can still sort the data.

Marc
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top