Skip to content

M_CSharpx_Either_Try__1

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

Either.Try(TRight) Method

Wraps a function, encapsulates any exception thrown within to a Either.

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

Syntax

C#

public static Either<Exception, TRight> Try<TRight>(
	Func<TRight> func
)

VB

Public Shared Function Try(Of TRight) ( 
	func As Func(Of TRight)
) As Either(Of Exception, TRight)

C++

public:
generic<typename TRight>
static Either<Exception^, TRight>^ Try(
	Func<TRight>^ func
)

F#

static member Try : 
        func : Func<'TRight> -> Either<Exception, 'TRight> 

Parameters

 

func
Type: System.Func(TRight)

Type Parameters

 

TRight

Return Value

Type: Either(Exception, TRight)

See Also

Reference

Either Class
CSharpx Namespace

Clone this wiki locally
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy