标签:
原文链接 原文非常详细
自己写了几句代码,可以用作参考
Action action = delegate() { button1.Text = "aaab"; }; Func<int, int> mfa = mb => mb * 2; Func<int, int> mfb = mb => mb * 2 + 5; List<object> marry = new List<object>(); marry.Add(action); marry.Add(mfa); marry.Add(mfb); ((Action)marry[0])(); MessageBox.Show(((Func<int, int>)marry[1])(10).ToString()); MessageBox.Show(((Func<int, int>)marry[2])(100).ToString());
标签:
原文地址:http://www.cnblogs.com/flyant/p/4457843.html