FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

M_CSharpx_MaybeExtensions_Match__1 · commandlineparser/commandline Wiki · GitHub

M_CSharpx_MaybeExtensions_Match__1 · commandlineparser/commandline Wiki · GitHub
Skip to content

Navigation Menu

M_CSharpx_MaybeExtensions_Match__1

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

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

Provides pattern matching using Action delegates.

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

Syntax

C#

public static void Match<T>(
	this Maybe<T> maybe,
	Action<T> ifJust,
	Action ifNothing
)

VB

<ExtensionAttribute>
Public Shared Sub Match(Of T) ( 
	maybe As Maybe(Of T),
	ifJust As Action(Of T),
	ifNothing As Action
)

C++

public:
[ExtensionAttribute]
generic<typename T>
static void Match(
	Maybe<T>^ maybe, 
	Action<T>^ ifJust, 
	Action^ ifNothing
)

F#

[<ExtensionAttribute>]
static member Match : 
        maybe : Maybe<'T> * 
        ifJust : Action<'T> * 
        ifNothing : Action -> unit 

Parameters

 

maybe
Type: CSharpx.Maybe(T)
ifJust
Type: System.Action(T)
ifNothing
Type: System.Action

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

Wiki pages Pages 1,025

Clone this wiki locally

Footer

© 2026 GitHub, Inc.

Back | FazBrowse Home | New Git URL