StringBuilderExtensions Class

Provides extension methods for StringBuilder.

public static class StringBuilderExtensions

Methods

NameDescription
StringBuilder.AppendFormattedObject(object?, string?)Appends a text representation of an object to the end of this instance, using the same algorithm as ExceptionHelper.FormatObject.

StringBuilder.AppendFormattedObject(object?, string?)

Appends a text representation of an object to the end of this instance, using the same algorithm as ExceptionHelper.FormatObject.

extension(StringBuilder @this)
{
    public StringBuilder AppendFormattedObject(object? obj, string? format = null)
}

Parameters

this StringBuilder
The StringBuilder on which this method is called.
obj object?
The object to represent. Can be null.
format string?
An optional format string to apply if obj implements IFormattable.

Returns

StringBuilder A reference to this instance after the append operation has completed.

Exceptions

ArgumentNullException
this is null.