摘要:
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; }} 阅读全文
摘要:
示例一: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( 阅读全文