摘要: 有这样2个数组,如何比较他们的大小呢?数组1 int[] arr1 = new int[]2 {3 1,2,3,44 };5 int[] arr2 = new int[]6 {7 1,2,3,58 }; 如果是NET4.0之前,我想好多人都会拿出数组的元素,一个个的比较。没错,我的想法也是这样的。 但是NET4.0中,数组基类Array实现了一个新增的接口IStructuralEquatable,从而是所有数据可以直接对比其所拥有的数据是否相等。 public interface IStructuralEquatable { bool Equals(object other, IEquali. 阅读全文
posted @ 2011-05-17 17:08 高导 阅读(2437) 评论(1) 推荐(0) 编辑