FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

M_CSharpx_EnumerableExtensions_Fold__2 · commandlineparser/commandline Wiki · GitHub

M_CSharpx_EnumerableExtensions_Fold__2 · commandlineparser/commandline Wiki · GitHub
Skip to content

Navigation Menu

M_CSharpx_EnumerableExtensions_Fold__2

Moh.Hassan edited this page Oct 10, 2019 · 1 revision

EnumerableExtensions.Fold(T, TResult) Method (IEnumerable(T), Func(T, TResult))

Returns the result of applying a function to a sequence of 1 element.

Namespace: CSharpx
Assembly: CommandLine (in CommandLine.dll) Version: 0.0.0

Syntax

C#

public static TResult Fold<T, TResult>(
	this IEnumerable<T> source,
	Func<T, TResult> folder
)

VB

<ExtensionAttribute>
Public Shared Function Fold(Of T, TResult) ( 
	source As IEnumerable(Of T),
	folder As Func(Of T, TResult)
) As TResult

C++

public:
[ExtensionAttribute]
generic<typename T, typename TResult>
static TResult Fold(
	IEnumerable<T>^ source, 
	Func<T, TResult>^ folder
)

F#

[<ExtensionAttribute>]
static member Fold : 
        source : IEnumerable<'T> * 
        folder : Func<'T, 'TResult> -> 'TResult 

Parameters

 

source
Type: System.Collections.Generic.IEnumerable(T)
folder
Type: System.Func(T, TResult)

Type Parameters

 

T
TResult

Return Value

Type: TResult

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IEnumerable(T). 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).

See Also

Reference

EnumerableExtensions Class
Fold Overload
CSharpx Namespace

Wiki pages Pages 1,025

Clone this wiki locally

Footer

© 2026 GitHub, Inc.

Back | FazBrowse Home | New Git URL