Why aren't IStructuralEquatable and IStructuralComparable generic?

System.Collections.IStructuralEquatableSystem.Collections.IStructuralComparable是在.NET 4中添加的,但它们为什么不是通用的,如IEquatable<T>IComparable<T>


The example on MSDN gives part of the answer here; it seems to be useful for heterogeneous equality, rather than homogeneous equality - ie for testing whether two objects (/values) of potentially different types should be considered equal. In such scenarios, it is extremely likely that the calling code is dealing with object (to represent heterogeneous data). And generic methods don't play nicely then.

链接地址: http://www.djcxy.com/p/50854.html

上一篇: 网络编程:套接字功能:地址族VS协议族

下一篇: 为什么不是IStructuralEquatable和IStructuralComparable通用的?