EnumerableUtility.Zip<T1,T2> method

Combines two same sized sequences.

public static IEnumerable<(T1, T2)> Zip<T1, T2>(IEnumerable<T1> first, IEnumerable<T2> second)
parameter description
first An IEnumerable whose elements will be returned as ValueTuple.First.
second An IEnumerable whose elements will be returned as ValueTuple.Second.

Return Value

A sequence of tuples combining the input items. Throws if the sequences don’t have the same number of items.

See Also