Click or drag to resize

MoreEnumerableFoldT, TResult Method (IEnumerableT, FuncT, T, T, T, T, T, T, T, T, TResult)

Returns the result of applying a function to a sequence of 9 elements.

Namespace:  MoreLinq
Assembly:  MoreLinq (in MoreLinq.dll) Version: 2.4.0
public static TResult Fold<T, TResult>(
	this IEnumerable<T> source,
	Func<T, T, T, T, T, T, T, T, T, TResult> folder


Type: System.Collections.GenericIEnumerableT
The sequence of items to fold.
Type: SystemFuncT, T, T, T, T, T, T, T, T, TResult
Function to apply to the elements in the sequence.

Type Parameters

Type of element in the source sequence
Type of the result

Return Value

Type: TResult
The folded value returned by folder.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IEnumerableT. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
ArgumentNullExceptionsource is null
ArgumentNullExceptionfolder is null
InvalidOperationExceptionsource does not contain exactly 9 elements
This operator uses immediate execution and effectively buffers as many items of the source sequence as necessary.
See Also