Skip to content

M_CSharpx_Either_Cast__1

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

Either.Cast(TRight) Method

Attempts to cast an object. Stores the cast value in 1Of2 if successful, otherwise stores the exception in 2Of2

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

Syntax

C#

public static Either<Exception, TRight> Cast<TRight>(
	Object obj
)

VB

Public Shared Function Cast(Of TRight) ( 
	obj As Object
) As Either(Of Exception, TRight)

C++

public:
generic<typename TRight>
static Either<Exception^, TRight>^ Cast(
	Object^ obj
)

F#

static member Cast : 
        obj : Object -> Either<Exception, 'TRight> 

Parameters

 

obj
Type: System.Object

Type Parameters

 

TRight

Return Value

Type: Either(Exception, TRight)

See Also

Reference

Either Class
CSharpx Namespace

Clone this wiki locally