Hello, i have the next 2 methods
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;
}
I want to make a generic method instead of Method2, something like static string[][] Method2(this IQuerable, string method1Name) Any tips? Thanks.