Skip to content

M_CSharpx_MaybeExtensions_Do__1

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

MaybeExtensions.Do(T) Method (Maybe(T), Action(T))

If contans a value executes an Action(T) delegate over it.

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

Syntax

C#

public static void Do<T>(
	this Maybe<T> maybe,
	Action<T> action
)

VB

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

C++

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

F#

[<ExtensionAttribute>]
static member Do : 
        maybe : Maybe<'T> * 
        action : Action<'T> -> unit 

Parameters

 

maybe
Type: CSharpx.Maybe(T)
action
Type: System.Action(T)

Type Parameters

 

T

Usage Note

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