Skip to content

M_CSharpx_Either_Select__3

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

Either.Select(TLeft, TRight, TResult) Method

Map operation compatible with Linq.

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

Syntax

C#

public static Either<TLeft, TResult> Select<TLeft, TRight, TResult>(
	this Either<TLeft, TRight> either,
	Func<TRight, TResult> selector
)

VB

<ExtensionAttribute>
Public Shared Function Select(Of TLeft, TRight, TResult) ( 
	either As Either(Of TLeft, TRight),
	selector As Func(Of TRight, TResult)
) As Either(Of TLeft, TResult)

C++

public:
[ExtensionAttribute]
generic<typename TLeft, typename TRight, typename TResult>
static Either<TLeft, TResult>^ Select(
	Either<TLeft, TRight>^ either, 
	Func<TRight, TResult>^ selector
)

F#

[<ExtensionAttribute>]
static member Select : 
        either : Either<'TLeft, 'TRight> * 
        selector : Func<'TRight, 'TResult> -> Either<'TLeft, 'TResult> 

Parameters

 

either
Type: CSharpx.Either(TLeft, TRight)
selector
Type: System.Func(TRight, TResult)

Type Parameters

 

TLeft
TRight
TResult

Return Value

Type: Either(TLeft, TResult)

Usage Note

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

Either Class
CSharpx Namespace

Clone this wiki locally