I have the following Method
public static List<T> MergeAndSort<T>(List<List<T>> listOfLists) where T : Foo
{
List<T> list = listOfLists.SelectMany(bunch => bunch).ToList();
list.OrderBy(x => x.FooLongMember);
return list;
}
I look for a solution that provides a completely generic version. Currently I need to specify what T is as well as specify the specific member name within Foo in order to order by such member. The member currently is of type long. Can I rewrite the function to at least not have to specify that I pass in a List of Lists of type Foo? I target C#, .Net4.0. Thanks
something like this?
–