两个类是否相等
摘要:
例如你有一个类如下:public class Class1{private int m;private string n; public int M { set { m = value; } get { return m; } } public string N { set { n = value; } get { return n; } }public override bool Equals(object obj){ Class1 anotherClass = obj as Class1;if (anotherClass != null) return( this.m == another 阅读全文
posted @ 2011-11-24 08:58 恒波 阅读(620) 评论(0) 推荐(0) 编辑