摘要: private class MyMenuComparer : IEqualityComparer{public bool Equals(ParMenu x, ParMenu y){ return x.parentColor == y.parentColor && x.parentMenu == y.parentMenu; }public int GetHashCode(ParMenu obj) { return obj.parentMenu.Length; }} 阅读全文
posted @ 2013-12-20 21:00 cn_king 阅读(239) 评论(0) 推荐(0) 编辑
摘要: 示例一:class Program {static void Main(string[] args) {string res= new Program().ShowMsg();Console.WriteLine(res);Console.Read(); }private delegate string DelegateMsg();private string ShowMsg() {DelegateMsg dmsg = GetMsg;return dmsg.Invoke(); }public string GetMsg() {return DateTime.Now.Ticks.ToString( 阅读全文
posted @ 2013-12-20 20:57 cn_king 阅读(216) 评论(0) 推荐(0) 编辑