Прочетете на английски Редактиране

Споделяне чрез


MemoryExtensions.TryWriteInterpolatedStringHandler.AppendFormatted Method

Definition

Overloads

AppendFormatted(ReadOnlySpan<Char>)

Writes the specified value to the handler.

AppendFormatted(String)

Writes the specified value to the handler.

AppendFormatted(Object, Int32, String)

Writes the specified value to the handler.

AppendFormatted(ReadOnlySpan<Char>, Int32, String)

Writes the specified value to the handler.

AppendFormatted(String, Int32, String)

Writes a specified value to the handler using a specified format string.

AppendFormatted<T>(T)

Writes the specified value to the handler.

AppendFormatted<T>(T, Int32)

Writes the specified value to the handler.

AppendFormatted<T>(T, String)

Writes a specified value to the handler using a specified format string.

AppendFormatted<T>(T, Int32, String)

Writes a specified value to the handler using a specified format string.

AppendFormatted(ReadOnlySpan<Char>)

Source:
MemoryExtensions.cs
Source:
MemoryExtensions.cs
Source:
MemoryExtensions.cs

Writes the specified value to the handler.

C#
public bool AppendFormatted(scoped ReadOnlySpan<char> value);
C#
public bool AppendFormatted(ReadOnlySpan<char> value);

Parameters

value
ReadOnlySpan<Char>

The value to write.

Returns

false if the operation failed; true otherwise.

Applies to

.NET 10 и други версии
Продукт Версии
.NET 6, 7, 8, 9, 10

AppendFormatted(String)

Source:
MemoryExtensions.cs
Source:
MemoryExtensions.cs
Source:
MemoryExtensions.cs

Writes the specified value to the handler.

C#
public bool AppendFormatted(string? value);

Parameters

value
String

The value to write.

Returns

true on success; false otherwise.

Applies to

.NET 10 и други версии
Продукт Версии
.NET 6, 7, 8, 9, 10

AppendFormatted(Object, Int32, String)

Source:
MemoryExtensions.cs
Source:
MemoryExtensions.cs
Source:
MemoryExtensions.cs

Writes the specified value to the handler.

C#
public bool AppendFormatted(object? value, int alignment = 0, string? format = default);

Parameters

value
Object

The value to write.

alignment
Int32

The minimum number of characters that should be written for this value. A negative value indicates left-aligned, and the required minimum is the absolute value.

format
String

The format string.

Returns

true on success; false otherwise.

Applies to

.NET 10 и други версии
Продукт Версии
.NET 6, 7, 8, 9, 10

AppendFormatted(ReadOnlySpan<Char>, Int32, String)

Source:
MemoryExtensions.cs
Source:
MemoryExtensions.cs
Source:
MemoryExtensions.cs

Writes the specified value to the handler.

C#
public bool AppendFormatted(scoped ReadOnlySpan<char> value, int alignment = 0, string? format = default);
C#
public bool AppendFormatted(ReadOnlySpan<char> value, int alignment = 0, string? format = default);

Parameters

value
ReadOnlySpan<Char>

The value to write.

alignment
Int32

>The minimum number of characters that should be written for this value. If the value is negative, it indicates left-aligned and the required minimum is the absolute value.

format
String

The format string.

Returns

false if the operation failed; true otherwise.

Applies to

.NET 10 и други версии
Продукт Версии
.NET 6, 7, 8, 9, 10

AppendFormatted(String, Int32, String)

Source:
MemoryExtensions.cs
Source:
MemoryExtensions.cs
Source:
MemoryExtensions.cs

Writes a specified value to the handler using a specified format string.

C#
public bool AppendFormatted(string? value, int alignment = 0, string? format = default);

Parameters

value
String

The value to write.

alignment
Int32

The minimum number of characters that should be written for this value. A negative value indicates left-aligned, and the required minimum is the absolute value.

format
String

The format string.

Returns

true on success; false otherwise.

Applies to

.NET 10 и други версии
Продукт Версии
.NET 6, 7, 8, 9, 10

AppendFormatted<T>(T)

Source:
MemoryExtensions.cs
Source:
MemoryExtensions.cs
Source:
MemoryExtensions.cs

Writes the specified value to the handler.

C#
public bool AppendFormatted<T>(T value);

Type Parameters

T

The type of the value to write.

Parameters

value
T

The value to write.

Returns

true on success; false otherwise.

Applies to

.NET 10 и други версии
Продукт Версии
.NET 6, 7, 8, 9, 10

AppendFormatted<T>(T, Int32)

Source:
MemoryExtensions.cs
Source:
MemoryExtensions.cs
Source:
MemoryExtensions.cs

Writes the specified value to the handler.

C#
public bool AppendFormatted<T>(T value, int alignment);

Type Parameters

T

The type of the value to write.

Parameters

value
T

The value to write.

alignment
Int32

The minimum number of characters that should be written for this value.A negative value indicates left-aligned, and the required minimum is the absolute value.

Returns

false if the operation failed; true otherwise.

Applies to

.NET 10 и други версии
Продукт Версии
.NET 6, 7, 8, 9, 10

AppendFormatted<T>(T, String)

Source:
MemoryExtensions.cs
Source:
MemoryExtensions.cs
Source:
MemoryExtensions.cs

Writes a specified value to the handler using a specified format string.

C#
public bool AppendFormatted<T>(T value, string? format);

Type Parameters

T

The type of the value to write.

Parameters

value
T

The value to write.

format
String

The format string.

Returns

true on success; false otherwise.

Applies to

.NET 10 и други версии
Продукт Версии
.NET 6, 7, 8, 9, 10

AppendFormatted<T>(T, Int32, String)

Source:
MemoryExtensions.cs
Source:
MemoryExtensions.cs
Source:
MemoryExtensions.cs

Writes a specified value to the handler using a specified format string.

C#
public bool AppendFormatted<T>(T value, int alignment, string? format);

Type Parameters

T

The type of the value to write.

Parameters

value
T

The value to write.

alignment
Int32

The minimum number of characters that should be written for this value. A negative value indicates left-aligned, and the required minimum is the absolute value.

format
String

The format string.

Returns

true on success; false otherwise.

Applies to

.NET 10 и други версии
Продукт Версии
.NET 6, 7, 8, 9, 10