Class EnumerableExtensions
.NET Specific Helper Extensions for IEnumerable
Inheritance
System.Object
EnumerableExtensions
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Lucene.Net.Support
Assembly: Lucene.Net.dll
Syntax
public static class EnumerableExtensions
Methods
| Improve this Doc View SourceInPairs<T, TOut>(IEnumerable<T>, Func<T, T, TOut>)
Enumerates a sequence in pairs
Declaration
public static IEnumerable<TOut> InPairs<T, TOut>(this IEnumerable<T> source, Func<T, T, TOut> join)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<T> | source | An System.Collections.Generic.IEnumerable<T> to enumerate in pairs. |
System.Func<T, T, TOut> | join | A function that is invoked for each pair of elements. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<TOut> | A new System.Collections.Generic.IEnumerable<T> containing the results from each pair. |
Type Parameters
Name | Description |
---|---|
T | The type of the elements of |
TOut | The type of the elements returned from |
Remarks
In the case of an uneven amount of elements, the list call to join
pases
default(T)
as the second parameter.
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|