Skip to content

M_CSharpx_MaybeExtensions_MatchJust__2

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

MaybeExtensions.MatchJust(T1, T2) Method

Matches a value returning true and tupled value itself via two output parameters.

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

Syntax

C#

public static bool MatchJust<T1, T2>(
	this Maybe<Tuple<T1, T2>> maybe,
	out T1 value1,
	out T2 value2
)

VB

<ExtensionAttribute>
Public Shared Function MatchJust(Of T1, T2) ( 
	maybe As Maybe(Of Tuple(Of T1, T2)),
	<OutAttribute> ByRef value1 As T1,
	<OutAttribute> ByRef value2 As T2
) As Boolean

C++

public:
[ExtensionAttribute]
generic<typename T1, typename T2>
static bool MatchJust(
	Maybe<Tuple<T1, T2>^>^ maybe, 
	[OutAttribute] T1% value1, 
	[OutAttribute] T2% value2
)

F#

[<ExtensionAttribute>]
static member MatchJust : 
        maybe : Maybe<Tuple<'T1, 'T2>> * 
        value1 : 'T1 byref * 
        value2 : 'T2 byref -> bool 

Parameters

 

maybe
Type: CSharpx.Maybe(Tuple(T1, T2))
value1
Type: T1
value2
Type: T2

Type Parameters

 

T1
T2

Return Value

Type: Boolean

Usage Note

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

MaybeExtensions Class
CSharpx Namespace

Clone this wiki locally