Skip to content

M_CSharpx_EitherExtensions_ToEither__1

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

EitherExtensions.ToEither(TRight) Method

Equivalent to monadic Return(TRight)(TRight) operation. Builds a Right(TLeft, TRight) value in case value by default.

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

Syntax

C#

public static Either<string, TRight> ToEither<TRight>(
	this TRight value
)

VB

<ExtensionAttribute>
Public Shared Function ToEither(Of TRight) ( 
	value As TRight
) As Either(Of String, TRight)

C++

public:
[ExtensionAttribute]
generic<typename TRight>
static Either<String^, TRight>^ ToEither(
	TRight value
)

F#

[<ExtensionAttribute>]
static member ToEither : 
        value : 'TRight -> Either<string, 'TRight> 

Parameters

 

value
Type: TRight

Type Parameters

 

TRight

Return Value

Type: Either(String, TRight)

Usage Note

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