Skip to content

M_CSharpx_MaybeExtensions_Select__2

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

MaybeExtensions.Select(TSource, TResult) Method

Map operation compatible with Linq.

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

Syntax

C#

public static Maybe<TResult> Select<TSource, TResult>(
	this Maybe<TSource> maybe,
	Func<TSource, TResult> selector
)

VB

<ExtensionAttribute>
Public Shared Function Select(Of TSource, TResult) ( 
	maybe As Maybe(Of TSource),
	selector As Func(Of TSource, TResult)
) As Maybe(Of TResult)

C++

public:
[ExtensionAttribute]
generic<typename TSource, typename TResult>
static Maybe<TResult>^ Select(
	Maybe<TSource>^ maybe, 
	Func<TSource, TResult>^ selector
)

F#

[<ExtensionAttribute>]
static member Select : 
        maybe : Maybe<'TSource> * 
        selector : Func<'TSource, 'TResult> -> Maybe<'TResult> 

Parameters

 

maybe
Type: CSharpx.Maybe(TSource)
selector
Type: System.Func(TSource, TResult)

Type Parameters

 

TSource
TResult

Return Value

Type: Maybe(TResult)

Usage Note

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