Click or drag to resize

StringHelperAppendIf Method (StringBuilder, Boolean, String)

Appends toAdd to stringBuilder, if condition is true.

Namespace:  Bootstrap.A11y.Helpers
Assembly:  Bootstrap.A11y (in Bootstrap.A11y.dll) Version: 1.1.0.0 (1.1.0.0)
Syntax
C#
public static bool AppendIf(
	StringBuilder stringBuilder,
	bool condition,
	string toAdd
)

Parameters

stringBuilder
Type: System.TextStringBuilder
The buffer to append to.
condition
Type: SystemBoolean
The condition to check.
toAdd
Type: SystemString
The string to append if not empty.

Return Value

Type: Boolean
Whether toAdd was appended.
See Also