Skip to content

M_CSharpx_EitherExtensions_Match__2

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

EitherExtensions.Match(TLeft, TRight) Method

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

Syntax

C#

public static void Match<TLeft, TRight>(
	this Either<TLeft, TRight> either,
	Action<TLeft> ifLeft,
	Action<TRight> ifRight
)

VB

<ExtensionAttribute>
Public Shared Sub Match(Of TLeft, TRight) ( 
	either As Either(Of TLeft, TRight),
	ifLeft As Action(Of TLeft),
	ifRight As Action(Of TRight)
)

C++

public:
[ExtensionAttribute]
generic<typename TLeft, typename TRight>
static void Match(
	Either<TLeft, TRight>^ either, 
	Action<TLeft>^ ifLeft, 
	Action<TRight>^ ifRight
)

F#

[<ExtensionAttribute>]
static member Match : 
        either : Either<'TLeft, 'TRight> * 
        ifLeft : Action<'TLeft> * 
        ifRight : Action<'TRight> -> unit 

Parameters

 

either
Type: CSharpx.Either(TLeft, TRight)
ifLeft
Type: System.Action(TLeft)
ifRight
Type: System.Action(TRight)

Type Parameters

 

TLeft
TRight

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

EitherExtensions Class
CSharpx Namespace

Clone this wiki locally