Skip to content

M_CSharpx_MaybeExtensions_Do__2

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

MaybeExtensions.Do(T1, T2) Method (Maybe(Tuple(T1, T2)), Action(T1, T2))

If contans a value executes an Action(T1, T2) delegate over it.

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

Syntax

C#

public static void Do<T1, T2>(
	this Maybe<Tuple<T1, T2>> maybe,
	Action<T1, T2> action
)

VB

<ExtensionAttribute>
Public Shared Sub Do(Of T1, T2) ( 
	maybe As Maybe(Of Tuple(Of T1, T2)),
	action As Action(Of T1, T2)
)

C++

public:
[ExtensionAttribute]
generic<typename T1, typename T2>
static void Do(
	Maybe<Tuple<T1, T2>^>^ maybe, 
	Action<T1, T2>^ action
)

F#

[<ExtensionAttribute>]
static member Do : 
        maybe : Maybe<Tuple<'T1, 'T2>> * 
        action : Action<'T1, 'T2> -> unit 

Parameters

 

maybe
Type: CSharpx.Maybe(Tuple(T1, T2))
action
Type: System.Action(T1, T2)

Type Parameters

 

T1
T2

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
Do Overload
CSharpx Namespace

Clone this wiki locally