Possible Duplicate:
No type inference with generic extension method
Consider two methods:
public static IEnumerable<V> Merge<V>
(this IEnumerable<IEnumerable<V>> coll)
public static IEnumerable<V> Merge<T, V>
(this IEnumerable<T> coll)
where T : IEnumerable<V>
Both compile just fine, in both cases the type of generic types will be known at compile time of caller, and thus the exact type of extended type.
You can call both fine, but only the first one as extension.
Why?
Update 1
To see it fail, use the second method and such example:
var x = new List<List<int>>();
var y = x.Merge();
Update -- closing
Don't you guys think the original post is WAY too elaborate to get the clear picture? For educational purposes I think this post shouldn't be closed, even if technically (i.e. the answer) it is duplicate. Just my 2 cents.