我接下来的2种方法:一般使用方法LINQ表达式
public static string[] Method1(CustomObj co)
{
return new string[] {co.X,co.Y };
}
public static string[][] Method2(IQueryable<CustomObj> cos)
{
string[][] s = new string[cos.Count()][];
int i = 0;
foreach (var co in cos)
{
s.SetValue(Method1(co), i);
i++;
}
return s;
}
我想打一个通用的方法,而不是方法2,类似
static string[][] Method2(this IQueryable query, string method1Name)
任何提示吗?
谢谢。
非常感谢,问题解决了 – bogus 2009-12-07 10:06:22