Skip to content

M_CommandLine_Infrastructure_StringBuilderExtensions_MapIf

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

StringBuilderExtensions.MapIf Method

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

Syntax

C#

public static StringBuilder MapIf(
	this StringBuilder builder,
	bool condition,
	Func<StringBuilder, StringBuilder> ifTrue
)

VB

<ExtensionAttribute>
Public Shared Function MapIf ( 
	builder As StringBuilder,
	condition As Boolean,
	ifTrue As Func(Of StringBuilder, StringBuilder)
) As StringBuilder

C++

public:
[ExtensionAttribute]
static StringBuilder^ MapIf(
	StringBuilder^ builder, 
	bool condition, 
	Func<StringBuilder^, StringBuilder^>^ ifTrue
)

F#

[<ExtensionAttribute>]
static member MapIf : 
        builder : StringBuilder * 
        condition : bool * 
        ifTrue : Func<StringBuilder, StringBuilder> -> StringBuilder 

Parameters

 

builder
Type: System.Text.StringBuilder
condition
Type: System.Boolean
ifTrue
Type: System.Func(StringBuilder, StringBuilder)

Return Value

Type: StringBuilder

Usage Note

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

StringBuilderExtensions Class
CommandLine.Infrastructure Namespace

Clone this wiki locally