2010年5月30日
摘要: System.Icomparable接口指定了一种允许一个对象可基于其些特定键值进行排序行为,以下是正式定义public interface IComparable{ int CompareTo(Object o);}不说太多废话,直接看例子,更直接public class Car{ private int carID; private string carName; public int ID ... 阅读全文
posted @ 2010-05-30 22:43 Ss_Andy 阅读(1157) 评论(0) 推荐(0) 编辑
摘要: 请先看下面一断代码public class Point:ICloneable{ private int x; public int X { get { return this.x; } set { this.x = value; } } public Point(int x) { this.x = x; } public override string ToString() { return st... 阅读全文
posted @ 2010-05-30 22:42 Ss_Andy 阅读(316) 评论(0) 推荐(0) 编辑