Just a little niggle about LINQ syntax. I\'m flattening an IEnumerable with SelectMany(x => x).
My problem i
Does this work in the way you want? I realize Jon posted a version of this solution, but he has a second type parameter which is only necessary if the resulting sequence type is different from the source sequence type.
public static IEnumerable Flatten(this IEnumerable source)
where T : IEnumerable
{
return source.SelectMany(item => item);
}