IndexOf<>(source, predicate, startIndex) IndexOf<>(source, element, comparer) JoinString<>(values, separator, prefix, suffix, lastSeparator) Order<>(source, comparer) SkipLast<>(source, count, throwIfNotEnough) Split<>(splitWhat, splitWhere) Split<>(source, chunkSize) ToDictionary2<>(source, key1Selector, key2Selector, comparer1, comparer2) ToDictionary2<>(source, key1Selector, key2Selector, elementSelector, comparer1, comparer2)
Legend Class Struct Enum Interface Delegate | Constructor Method Property Event Field |
| Extension method: IEnumerable<ValueTuple<T, T>> ConsecutivePairs<T>(this IEnumerable<T>, bool)Declarationpublic static IEnumerable<ValueTuple<T, T>> ConsecutivePairs<T>(
this IEnumerable<T> source,
bool closed
) Summary
Returns an enumeration of tuples containing all consecutive pairs of the elements. Generic type parametersT | This type parameter is not documented. |
Parametersthis IEnumerable<T> | source |
The input enumerable. | bool | closed |
If true, an additional pair containing the last and first element is included. For example, if the source
collection contains { 1, 2, 3, 4 } then the enumeration contains { (1, 2), (2, 3), (3, 4) } if closed is false, and { (1, 2), (2, 3), (3, 4), (4, 1) } if closed is true. |
|