Open
Description
I think it would be good to allow the caller to control what is being used to pad the shorter collection if desired, rather than relying on default(TResult)
. Especially for numerics, where 0 may very well have a meaning for the caller, other than "not there".
Since this would change the method signature, new method overrides would probably be required. These methods would probably have no need for a zip strategy argument either.
Here is the method signature I would envision:
private static IEnumerable<TResult> ZipImpl<TFirst, TSecond, TResult>(
IEnumerable<TFirst> first,
IEnumerable<TSecond> second,
Func<TFirst, TSecond, TResult> resultSelector,
TFirst padFirst,
TSecond padSecond)
Originally reported on Google Code with ID 6
Reported by @cammerman on 2009-02-16 03:05:10