StringBuilderExtensions Class
Provides extension methods for StringBuilder.
public static class StringBuilderExtensionsMethods
| Name | Description |
|---|---|
| StringBuilder.AppendClippedLiteral(StringLiteralKind, ReadOnlySpan<char>, int, int) | Appends the specified span of characters, expressed as a C# string literal, to the end of this instance. If the span is longer than the sum of headLength, tailLength, and the length of an ellipsis (three dots ...), then it is clipped, taking only the first headLength characters, followed by the ellipsis and the last tailLength characters. |
| StringBuilder.AppendClippedLiteral(StringLiteralKind, ReadOnlySpan<char>, int, int, bool) | Appends the specified span of characters, expressed as a C# string literal, to the end of this instance. If the span is longer than the sum of headLength, tailLength, and the length of an ellipsis (1 if useUnicodeEllipsis is true, 3 otherwise), then it is clipped, taking only the first headLength characters, followed by an ellipsis (either the Unicode character '\x2026' (…), or three dots ...) and the last tailLength characters. |
| StringBuilder.AppendClippedLiteral(StringLiteralKind, string?, int, int) | Appends the specified string, expressed as a C# string literal, to the end of this instance. If the string is longer than the sum of headLength, tailLength, and the length of an ellipsis (three dots ...), then it is clipped, taking only the first headLength characters, followed by the ellipsis and the last tailLength characters. |
| StringBuilder.AppendClippedLiteral(StringLiteralKind, string?, int, int, bool) | Appends the specified string, expressed as a C# string literal, to the end of this instance. If the string is longer than the sum of headLength, tailLength, and the length of an ellipsis (1 if useUnicodeEllipsis is true, 3 otherwise), then it is clipped, taking only the first headLength characters, followed by an ellipsis (either the Unicode character '\x2026' (…), or three dots ...) and the last tailLength characters. |
| StringBuilder.AppendClippedQuotedLiteral(ReadOnlySpan<char>, int, int) | Appends the specified span of characters, expressed as a C# quoted string literal, to the end of this instance. If the span is longer than the sum of headLength, tailLength, and the length of an ellipsis (three dots ...), then it is clipped, taking only the first headLength characters, followed by the ellipsis and the last tailLength characters. |
| StringBuilder.AppendClippedQuotedLiteral(ReadOnlySpan<char>, int, int, bool) | Appends the specified span of characters, expressed as a C# quoted string literal, to the end of this instance. If the span is longer than the sum of headLength, tailLength, and the length of an ellipsis (1 if useUnicodeEllipsis is true, 3 otherwise), then it is clipped, taking only the first headLength characters, followed by an ellipsis (either the Unicode character '\x2026' (…), or three dots ...) and the last tailLength characters. |
| StringBuilder.AppendClippedQuotedLiteral(string?, int, int) | Appends the specified string, expressed as a C# quoted string literal, to the end of this instance. If the string is longer than the sum of headLength, tailLength, and the length of an ellipsis (three dots ...), then it is clipped, taking only the first headLength characters, followed by the ellipsis and the last tailLength characters. |
| StringBuilder.AppendClippedQuotedLiteral(string?, int, int, bool) | Appends the specified string, expressed as a C# quoted string literal, to the end of this instance. If the string is longer than the sum of headLength, tailLength, and the length of an ellipsis (1 if useUnicodeEllipsis is true, 3 otherwise), then it is clipped, taking only the first headLength characters, followed by an ellipsis (either the Unicode character '\x2026' (…), or three dots ...) and the last tailLength characters. |
| StringBuilder.AppendClippedVerbatimLiteral(ReadOnlySpan<char>, int, int) | Appends the specified span of characters, expressed as a C# verbatim string literal, to the end of this instance. If the span is longer than the sum of headLength, tailLength, and the length of an ellipsis (three dots ...), then it is clipped, taking only the first headLength characters, followed by the ellipsis and the last tailLength characters. |
| StringBuilder.AppendClippedVerbatimLiteral(ReadOnlySpan<char>, int, int, bool) | Appends the specified span of characters, expressed as a C# verbatim string literal, to the end of this instance. If the span is longer than the sum of headLength, tailLength, and the length of an ellipsis (1 if useUnicodeEllipsis is true, 3 otherwise), then it is clipped, taking only the first headLength characters, followed by an ellipsis (either the Unicode character '\x2026' (…), or three dots ...) and the last tailLength characters. |
| StringBuilder.AppendClippedVerbatimLiteral(string?, int, int) | Appends the specified string, expressed as a C# verbatim string literal, to the end of this instance. If the string is longer than the sum of headLength, tailLength, and the length of an ellipsis (three dots ...), then it is clipped, taking only the first headLength characters, followed by the ellipsis and the last tailLength characters. |
| StringBuilder.AppendClippedVerbatimLiteral(string?, int, int, bool) | Appends the specified string, expressed as a C# verbatim string literal, to the end of this instance. If the string is longer than the sum of headLength, tailLength, and the length of an ellipsis (1 if useUnicodeEllipsis is true, 3 otherwise), then it is clipped, taking only the first headLength characters, followed by an ellipsis (either the Unicode character '\x2026' (…), or three dots ...) and the last tailLength characters. |
| StringBuilder.AppendLiteral(StringLiteralKind, ReadOnlySpan<char>) | Appends the specified span of characters, expressed as a C# string literal, to the end of this instance. |
| StringBuilder.AppendLiteral(StringLiteralKind, string?) | Appends the specified string, expressed as a C# string literal, to the end of this instance. |
| StringBuilder.AppendQuotedLiteral(ReadOnlySpan<char>) | Appends the specified span of characters, expressed as a C# quoted string literal, to the end of this instance. |
| StringBuilder.AppendQuotedLiteral(string?) | Appends the specified string, expressed as a C# quoted string literal, to the end of this instance. |
| StringBuilder.AppendResult(ReadOnlySpanFunc<char>) | Appends the result of a method to the end of this builder. |
| StringBuilder.AppendResult(Func<string?>) | Appends the result of a method to the end of this builder. |
| StringBuilder.AppendVerbatimLiteral(ReadOnlySpan<char>) | Appends the specified span of characters, expressed as a C# verbatim string literal, to the end of this instance. |
| StringBuilder.AppendVerbatimLiteral(string?) | Appends the specified string, expressed as a C# verbatim string literal, to the end of this instance. |
StringBuilder.AppendClippedLiteral overloads
StringBuilder.AppendClippedLiteral(StringLiteralKind, ReadOnlySpan<char>, int, int)
Appends the specified span of characters, expressed as a C# string literal, to the end of this instance. If the span is longer than the sum of headLength, tailLength, and the length of an ellipsis (three dots ...), then it is clipped, taking only the first headLength characters, followed by the ellipsis and the last tailLength characters.
extension(StringBuilder @this)
{
public StringBuilder AppendClippedLiteral(StringLiteralKind literalKind, ReadOnlySpan<char> chars, int headLength, int tailLength)
}Parameters
thisStringBuilder- The
StringBuilderon which this method is called. literalKindStringLiteralKind- A
StringLiteralKindconstant specifying the kind of string literal to append. charsReadOnlySpan<char>- The characters to append.
headLengthint- The number of characters to leave before clipping.
tailLengthint- The number of characters to leave after clipping.
Returns
StringBuilder A reference to this instance after the append operation has completed.
Exceptions
ArgumentNullExceptionthisisnull.ArgumentExceptionliteralKindis neitherStringLiteralKind.QuotednorStringLiteralKind.Verbatim.ArgumentOutOfRangeExceptionheadLengthis less than 0. - or -tailLengthis less than 0.
StringBuilder.AppendClippedLiteral(StringLiteralKind, ReadOnlySpan<char>, int, int, bool)
Appends the specified span of characters, expressed as a C# string literal, to the end of this instance. If the span is longer than the sum of headLength, tailLength, and the length of an ellipsis (1 if useUnicodeEllipsis is true, 3 otherwise), then it is clipped, taking only the first headLength characters, followed by an ellipsis (either the Unicode character '\x2026' (…), or three dots ...) and the last tailLength characters.
extension(StringBuilder @this)
{
public StringBuilder AppendClippedLiteral(StringLiteralKind literalKind, ReadOnlySpan<char> chars, int headLength, int tailLength, bool useUnicodeEllipsis)
}Parameters
thisStringBuilder- The
StringBuilderon which this method is called. literalKindStringLiteralKind- A
StringLiteralKindconstant specifying the kind of string literal to append. charsReadOnlySpan<char>- The characters to append.
headLengthint- The number of characters to leave before clipping.
tailLengthint- The number of characters to leave after clipping.
useUnicodeEllipsisbooltrueto use a single Unicode character Ellipsis ('\x2026',…) to replace the clipped part;falseto use three dots (...) instead.
Returns
StringBuilder A reference to this instance after the append operation has completed.
Exceptions
ArgumentNullExceptionthisisnull.ArgumentExceptionliteralKindis neitherStringLiteralKind.QuotednorStringLiteralKind.Verbatim.ArgumentOutOfRangeExceptionheadLengthis less than 0. - or -tailLengthis less than 0.
StringBuilder.AppendClippedLiteral(StringLiteralKind, string?, int, int)
Appends the specified string, expressed as a C# string literal, to the end of this instance. If the string is longer than the sum of headLength, tailLength, and the length of an ellipsis (three dots ...), then it is clipped, taking only the first headLength characters, followed by the ellipsis and the last tailLength characters.
extension(StringBuilder @this)
{
public StringBuilder AppendClippedLiteral(StringLiteralKind literalKind, string? str, int headLength, int tailLength)
}Parameters
thisStringBuilder- The
StringBuilderon which this method is called. literalKindStringLiteralKind- A
StringLiteralKindconstant specifying the kind of string literal to append. strstring?- The string to append.
headLengthint- The number of characters to leave before clipping.
tailLengthint- The number of characters to leave after clipping.
Returns
StringBuilder A reference to this instance after the append operation has completed.
Exceptions
ArgumentNullExceptionthisisnull.ArgumentExceptionliteralKindis neitherStringLiteralKind.QuotednorStringLiteralKind.Verbatim.ArgumentOutOfRangeExceptionheadLengthis less than 0. - or -tailLengthis less than 0.
Remarks
If str is null, the string null (without surrounding quotes) will be appended to this.
StringBuilder.AppendClippedLiteral(StringLiteralKind, string?, int, int, bool)
Appends the specified string, expressed as a C# string literal, to the end of this instance. If the string is longer than the sum of headLength, tailLength, and the length of an ellipsis (1 if useUnicodeEllipsis is true, 3 otherwise), then it is clipped, taking only the first headLength characters, followed by an ellipsis (either the Unicode character '\x2026' (…), or three dots ...) and the last tailLength characters.
extension(StringBuilder @this)
{
public StringBuilder AppendClippedLiteral(StringLiteralKind literalKind, string? str, int headLength, int tailLength, bool useUnicodeEllipsis)
}Parameters
thisStringBuilder- The
StringBuilderon which this method is called. literalKindStringLiteralKind- A
StringLiteralKindconstant specifying the kind of string literal to append. strstring?- The string to append.
headLengthint- The number of characters to leave before clipping.
tailLengthint- The number of characters to leave after clipping.
useUnicodeEllipsisbooltrueto use a single Unicode character Ellipsis ('\x2026',…) to replace the clipped part;falseto use three dots (...) instead.
Returns
StringBuilder A reference to this instance after the append operation has completed.
Exceptions
ArgumentNullExceptionthisisnull.ArgumentExceptionliteralKindis neitherStringLiteralKind.QuotednorStringLiteralKind.Verbatim.ArgumentOutOfRangeExceptionheadLengthis less than 0. - or -tailLengthis less than 0.
Remarks
If str is null, the string null (without surrounding quotes) will be appended to this.
StringBuilder.AppendClippedQuotedLiteral overloads
StringBuilder.AppendClippedQuotedLiteral(ReadOnlySpan<char>, int, int)
Appends the specified span of characters, expressed as a C# quoted string literal, to the end of this instance. If the span is longer than the sum of headLength, tailLength, and the length of an ellipsis (three dots ...), then it is clipped, taking only the first headLength characters, followed by the ellipsis and the last tailLength characters.
extension(StringBuilder @this)
{
public StringBuilder AppendClippedQuotedLiteral(ReadOnlySpan<char> chars, int headLength, int tailLength)
}Parameters
thisStringBuilder- The
StringBuilderon which this method is called. charsReadOnlySpan<char>- The characters to append.
headLengthint- The number of characters to leave before clipping.
tailLengthint- The number of characters to leave after clipping.
Returns
StringBuilder A reference to this instance after the append operation has completed.
Exceptions
ArgumentNullExceptionthisisnull.ArgumentOutOfRangeExceptionheadLengthis less than 0. - or -tailLengthis less than 0.
StringBuilder.AppendClippedQuotedLiteral(ReadOnlySpan<char>, int, int, bool)
Appends the specified span of characters, expressed as a C# quoted string literal, to the end of this instance. If the span is longer than the sum of headLength, tailLength, and the length of an ellipsis (1 if useUnicodeEllipsis is true, 3 otherwise), then it is clipped, taking only the first headLength characters, followed by an ellipsis (either the Unicode character '\x2026' (…), or three dots ...) and the last tailLength characters.
extension(StringBuilder @this)
{
public StringBuilder AppendClippedQuotedLiteral(ReadOnlySpan<char> chars, int headLength, int tailLength, bool useUnicodeEllipsis)
}Parameters
thisStringBuilder- The
StringBuilderon which this method is called. charsReadOnlySpan<char>- The characters to append.
headLengthint- The number of characters to leave before clipping.
tailLengthint- The number of characters to leave after clipping.
useUnicodeEllipsisbooltrueto use a single Unicode character Ellipsis ('\x2026',…) to replace the clipped part;falseto use three dots (...) instead.
Returns
StringBuilder A reference to this instance after the append operation has completed.
Exceptions
ArgumentNullExceptionthisisnull.ArgumentOutOfRangeExceptionheadLengthis less than 0. - or -tailLengthis less than 0.
StringBuilder.AppendClippedQuotedLiteral(string?, int, int)
Appends the specified string, expressed as a C# quoted string literal, to the end of this instance. If the string is longer than the sum of headLength, tailLength, and the length of an ellipsis (three dots ...), then it is clipped, taking only the first headLength characters, followed by the ellipsis and the last tailLength characters.
extension(StringBuilder @this)
{
public StringBuilder AppendClippedQuotedLiteral(string? str, int headLength, int tailLength)
}Parameters
thisStringBuilder- The
StringBuilderon which this method is called. strstring?- The string to append.
headLengthint- The number of characters to leave before clipping.
tailLengthint- The number of characters to leave after clipping.
Returns
StringBuilder A reference to this instance after the append operation has completed.
Exceptions
ArgumentNullExceptionthisisnull.ArgumentOutOfRangeExceptionheadLengthis less than 0. - or -tailLengthis less than 0.
Remarks
If str is null, the string null (without surrounding quotes) will be appended to this.
StringBuilder.AppendClippedQuotedLiteral(string?, int, int, bool)
Appends the specified string, expressed as a C# quoted string literal, to the end of this instance. If the string is longer than the sum of headLength, tailLength, and the length of an ellipsis (1 if useUnicodeEllipsis is true, 3 otherwise), then it is clipped, taking only the first headLength characters, followed by an ellipsis (either the Unicode character '\x2026' (…), or three dots ...) and the last tailLength characters.
extension(StringBuilder @this)
{
public StringBuilder AppendClippedQuotedLiteral(string? str, int headLength, int tailLength, bool useUnicodeEllipsis)
}Parameters
thisStringBuilder- The
StringBuilderon which this method is called. strstring?- The string to append.
headLengthint- The number of characters to leave before clipping.
tailLengthint- The number of characters to leave after clipping.
useUnicodeEllipsisbooltrueto use a single Unicode character Ellipsis ('\x2026',…) to replace the clipped part;falseto use three dots (...) instead.
Returns
StringBuilder A reference to this instance after the append operation has completed.
Exceptions
ArgumentNullExceptionthisisnull.ArgumentOutOfRangeExceptionheadLengthis less than 0. - or -tailLengthis less than 0.
Remarks
If str is null, the string null (without surrounding quotes) will be appended to this.
StringBuilder.AppendClippedVerbatimLiteral overloads
StringBuilder.AppendClippedVerbatimLiteral(ReadOnlySpan<char>, int, int)
Appends the specified span of characters, expressed as a C# verbatim string literal, to the end of this instance. If the span is longer than the sum of headLength, tailLength, and the length of an ellipsis (three dots ...), then it is clipped, taking only the first headLength characters, followed by the ellipsis and the last tailLength characters.
extension(StringBuilder @this)
{
public StringBuilder AppendClippedVerbatimLiteral(ReadOnlySpan<char> chars, int headLength, int tailLength)
}Parameters
thisStringBuilder- The
StringBuilderon which this method is called. charsReadOnlySpan<char>- The characters to append.
headLengthint- The number of characters to leave before clipping.
tailLengthint- The number of characters to leave after clipping.
Returns
StringBuilder A reference to this instance after the append operation has completed.
Exceptions
ArgumentNullExceptionthisisnull.ArgumentOutOfRangeExceptionheadLengthis less than 0. - or -tailLengthis less than 0.
StringBuilder.AppendClippedVerbatimLiteral(ReadOnlySpan<char>, int, int, bool)
Appends the specified span of characters, expressed as a C# verbatim string literal, to the end of this instance. If the span is longer than the sum of headLength, tailLength, and the length of an ellipsis (1 if useUnicodeEllipsis is true, 3 otherwise), then it is clipped, taking only the first headLength characters, followed by an ellipsis (either the Unicode character '\x2026' (…), or three dots ...) and the last tailLength characters.
extension(StringBuilder @this)
{
public StringBuilder AppendClippedVerbatimLiteral(ReadOnlySpan<char> chars, int headLength, int tailLength, bool useUnicodeEllipsis)
}Parameters
thisStringBuilder- The
StringBuilderon which this method is called. charsReadOnlySpan<char>- The characters to append.
headLengthint- The number of characters to leave before clipping.
tailLengthint- The number of characters to leave after clipping.
useUnicodeEllipsisbooltrueto use a single Unicode character Ellipsis ('\x2026',…) to replace the clipped part;falseto use three dots (...) instead.
Returns
StringBuilder A reference to this instance after the append operation has completed.
Exceptions
ArgumentNullExceptionthisisnull.ArgumentOutOfRangeExceptionheadLengthis less than 0. - or -tailLengthis less than 0.
StringBuilder.AppendClippedVerbatimLiteral(string?, int, int)
Appends the specified string, expressed as a C# verbatim string literal, to the end of this instance. If the string is longer than the sum of headLength, tailLength, and the length of an ellipsis (three dots ...), then it is clipped, taking only the first headLength characters, followed by the ellipsis and the last tailLength characters.
extension(StringBuilder @this)
{
public StringBuilder AppendClippedVerbatimLiteral(string? str, int headLength, int tailLength)
}Parameters
thisStringBuilder- The
StringBuilderon which this method is called. strstring?- The string to append.
headLengthint- The number of characters to leave before clipping.
tailLengthint- The number of characters to leave after clipping.
Returns
StringBuilder A reference to this instance after the append operation has completed.
Exceptions
ArgumentNullExceptionthisisnull.ArgumentOutOfRangeExceptionheadLengthis less than 0. - or -tailLengthis less than 0.
Remarks
If str is null, the string null (without surrounding quotes) will be appended to this.
StringBuilder.AppendClippedVerbatimLiteral(string?, int, int, bool)
Appends the specified string, expressed as a C# verbatim string literal, to the end of this instance. If the string is longer than the sum of headLength, tailLength, and the length of an ellipsis (1 if useUnicodeEllipsis is true, 3 otherwise), then it is clipped, taking only the first headLength characters, followed by an ellipsis (either the Unicode character '\x2026' (…), or three dots ...) and the last tailLength characters.
extension(StringBuilder @this)
{
public StringBuilder AppendClippedVerbatimLiteral(string? str, int headLength, int tailLength, bool useUnicodeEllipsis)
}Parameters
thisStringBuilder- The
StringBuilderon which this method is called. strstring?- The string to append.
headLengthint- The number of characters to leave before clipping.
tailLengthint- The number of characters to leave after clipping.
useUnicodeEllipsisbooltrueto use a single Unicode character Ellipsis ('\x2026',…) to replace the clipped part;falseto use three dots (...) instead.
Returns
StringBuilder A reference to this instance after the append operation has completed.
Exceptions
ArgumentNullExceptionthisisnull.ArgumentOutOfRangeExceptionheadLengthis less than 0. - or -tailLengthis less than 0.
Remarks
If str is null, the string null (without surrounding quotes) will be appended to this.
StringBuilder.AppendLiteral overloads
StringBuilder.AppendLiteral(StringLiteralKind, ReadOnlySpan<char>)
Appends the specified span of characters, expressed as a C# string literal, to the end of this instance.
extension(StringBuilder @this)
{
public StringBuilder AppendLiteral(StringLiteralKind literalKind, ReadOnlySpan<char> chars)
}Parameters
thisStringBuilder- The
StringBuilderon which this method is called. literalKindStringLiteralKind- A
StringLiteralKindconstant specifying the kind of string literal to append. charsReadOnlySpan<char>- The characters to append.
Returns
StringBuilder A reference to this instance after the append operation has completed.
Exceptions
ArgumentNullExceptionthisisnull.ArgumentExceptionliteralKindis neitherStringLiteralKind.QuotednorStringLiteralKind.Verbatim.
See also
StringBuilder.AppendLiteral(StringLiteralKind, string?)
Appends the specified string, expressed as a C# string literal, to the end of this instance.
extension(StringBuilder @this)
{
public StringBuilder AppendLiteral(StringLiteralKind literalKind, string? str)
}Parameters
thisStringBuilder- The
StringBuilderon which this method is called. literalKindStringLiteralKind- A
StringLiteralKindconstant specifying the kind of string literal to append. strstring?- The string to append.
Returns
StringBuilder A reference to this instance after the append operation has completed.
Exceptions
ArgumentNullExceptionthisisnull.ArgumentExceptionliteralKindis neitherStringLiteralKind.QuotednorStringLiteralKind.Verbatim.
Remarks
If str is null, the string null (without surrounding quotes) will be appended to this.
See also
StringBuilder.AppendQuotedLiteral overloads
StringBuilder.AppendQuotedLiteral(ReadOnlySpan<char>)
Appends the specified span of characters, expressed as a C# quoted string literal, to the end of this instance.
extension(StringBuilder @this)
{
public StringBuilder AppendQuotedLiteral(ReadOnlySpan<char> chars)
}Parameters
thisStringBuilder- The
StringBuilderon which this method is called. charsReadOnlySpan<char>- The characters to append.
Returns
StringBuilder A reference to this instance after the append operation has completed.
Exceptions
ArgumentNullExceptionthisisnull.
See also
StringBuilder.AppendQuotedLiteral(string?)
Appends the specified string, expressed as a C# quoted string literal, to the end of this instance.
extension(StringBuilder @this)
{
public StringBuilder AppendQuotedLiteral(string? str)
}Parameters
thisStringBuilder- The
StringBuilderon which this method is called. strstring?- The string to append.
Returns
StringBuilder A reference to this instance after the append operation has completed.
Exceptions
ArgumentNullExceptionthisisnull.
Remarks
If str is null, the string null (without surrounding quotes) will be appended to this.
See also
StringBuilder.AppendResult overloads
StringBuilder.AppendResult(ReadOnlySpanFunc<char>)
Appends the result of a method to the end of this builder.
extension(StringBuilder @this)
{
public StringBuilder AppendResult(ReadOnlySpanFunc<char> func)
}Parameters
thisStringBuilder- The
StringBuilderon which this method is called. funcReadOnlySpanFunc<char>- The method to call.
Returns
StringBuilder A reference to this after the operation is completed.
Exceptions
ArgumentNullExceptionthisisnull. - or -funcisnull.
StringBuilder.AppendResult(Func<string?>)
Appends the result of a method to the end of this builder.
extension(StringBuilder @this)
{
public StringBuilder AppendResult(Func<string?> provider)
}Parameters
thisStringBuilder- The
StringBuilderon which this method is called. providerFunc<string?>- The method to call.
Returns
StringBuilder A reference to this after the operation is completed.
Exceptions
ArgumentNullExceptionthisisnull. - or -providerisnull.
StringBuilder.AppendVerbatimLiteral overloads
StringBuilder.AppendVerbatimLiteral(ReadOnlySpan<char>)
Appends the specified span of characters, expressed as a C# verbatim string literal, to the end of this instance.
extension(StringBuilder @this)
{
public StringBuilder AppendVerbatimLiteral(ReadOnlySpan<char> chars)
}Parameters
thisStringBuilder- The
StringBuilderon which this method is called. charsReadOnlySpan<char>- The characters to append.
Returns
StringBuilder A reference to this instance after the append operation has completed.
Exceptions
ArgumentNullExceptionthisisnull.
See also
StringBuilder.AppendVerbatimLiteral(string?)
Appends the specified string, expressed as a C# verbatim string literal, to the end of this instance.
extension(StringBuilder @this)
{
public StringBuilder AppendVerbatimLiteral(string? str)
}Parameters
thisStringBuilder- The
StringBuilderon which this method is called. strstring?- The string to append.
Returns
StringBuilder A reference to this instance after the append operation has completed.
Exceptions
ArgumentNullExceptionthisisnull.
Remarks
If str is null, the string null (without surrounding quotes) will be appended to this.