Tuesday 15 February 2011

c# - Why does a generic and a non-generic IComparable interface exist? -


Perhaps this question sounds silly, but why and the IComparable interface is present?

Besides, which one has been liked to use and why?

non-normal narrow was added to version 1.1, before generic Was launched, while IComparer & lt; T & gt; was added with Generic in version 2.0.

The common version is similar to all the generic interfaces - it is safe and more clearly, the document structure types do not need to be processed in a general way, when they have any object For arguments such as IComparable.CompareTo , there is also a performance gain.

No comments:

Post a Comment