标签:
public int Add(int a,int b) { return a + b; } public int M1(Func<int,int,int> func,int a,int b) { var result = func(a,b); return result; } Func<int,int,int> addMethod = Add; Func<int, int, int> addMethod1 = delegate(int a, int b) { return a + b; }; Func<int, int, int> addMethod2 = (a, b) => { return a + b; }; M1(delegate(int a, int b) { return a + b; }, 3, 5); IQueryable Where方法: IQueryable<User> user = null; var result= user.Where(delegate(User u) { return u.Name == "LBI"; });
标签:
原文地址:http://www.cnblogs.com/liubiao/p/4558960.html