Table of Contents

Class ThreadSafeStringBuilder

Namespace
SharpConsoleUI.Helpers
Assembly
SharpConsoleUI.dll

Provides a thread-safe wrapper around StringBuilder for concurrent string building operations.

public class ThreadSafeStringBuilder
Inheritance
ThreadSafeStringBuilder
Inherited Members

Remarks

All methods in this class are synchronized using a lock to ensure thread safety when multiple threads are appending to or reading from the string builder.

Methods

Append(string?)

Appends the specified string to the end of this instance in a thread-safe manner.

public void Append(string? value)

Parameters

value string

The string to append, or null.

AppendLine(string?)

Appends the specified string followed by the default line terminator in a thread-safe manner.

public void AppendLine(string? value)

Parameters

value string

The string to append, or null.

ToString()

Converts the value of this instance to a string in a thread-safe manner.

public override string ToString()

Returns

string

A string whose value is the same as this instance.