I re-executed Enumerable.Zip(mine is called Merge). This is the same as the original, except that if one enumerator MoveNextreturns false before the other (indicating that the sequences do not have the same length), it throws an exception.
Enumerable.Zip
Merge
MoveNext
My question is: what would be the most suitable exception from BCL to throw here? (I want this to closely simulate the rest of the functions Enumerable(LINQ).)
Enumerable
I think since your second array will be an argument. So
System.ArgumentOutOfRangeException
ArgumentException, , ( ) . , , .
System.InvalidOperationException
, , - . , .