M_CSharpx_EitherExtensions_ToEither__1 - adutton/commandline GitHub Wiki
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
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>
- value
- Type: TRight
- TRight
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).