Class StringBuilderExtensions
- Namespace
- Songhay.Extensions
- Assembly
- SonghayCore.dll
Extensions of StringBuilder
public static class StringBuilderExtensions
- Inheritance
-
StringBuilderExtensions
- Inherited Members
Methods
AppendLabelWithValue(StringBuilder?, string, object?)
Appends the label with value.
public static void AppendLabelWithValue(this StringBuilder? builder, string name, object? value)
Parameters
builder
StringBuilderThe builder.
name
stringThe name.
value
objectThe value.
AppendLabelWithValue(StringBuilder?, string, object?, string?)
Appends the label with value.
public static void AppendLabelWithValue(this StringBuilder? builder, string name, object? value, string? defaultValue)
Parameters
builder
StringBuilderThe builder.
name
stringThe name.
value
objectThe value.
defaultValue
stringThe default value.
AppendLabelWithValue(StringBuilder?, string, object?, string?, bool)
Appends the label with value.
public static void AppendLabelWithValue(this StringBuilder? builder, string name, object? value, string? defaultValue, bool hasLineBreak)
Parameters
builder
StringBuilderThe builder.
name
stringThe name.
value
objectThe value.
defaultValue
stringThe default value.
hasLineBreak
boolWhen
true
add NewLine between label and value.
Remarks
This method will append name: value
to the appending StringBuilder.
This is useful when overriding ToString().