MemoryExtensions.TryWrite Metoda

Definicja

Przeciążenia

TryWrite(Span<Char>, IFormatProvider, CompositeFormat, Int32, Object[])

CompositeFormat Zapisuje ciąg w zakresie znaków, zastępując element formatu lub elementy reprezentacją ciągu odpowiadających argumentów.

TryWrite(Span<Char>, MemoryExtensions+TryWriteInterpolatedStringHandler, Int32)

Zapisuje określony ciąg interpolowany do zakresu znaków.

TryWrite(Span<Char>, IFormatProvider, MemoryExtensions+TryWriteInterpolatedStringHandler, Int32)

Zapisuje określony ciąg interpolowany do zakresu znaków.

TryWrite(Span<Char>, IFormatProvider, CompositeFormat, Int32, ReadOnlySpan<Object>)

CompositeFormat Zapisuje ciąg w zakresie znaków, zastępując element formatu lub elementy reprezentacją ciągu odpowiadających argumentów.

TryWrite<TArg0,TArg1,TArg2>(Span<Char>, IFormatProvider, CompositeFormat, Int32, TArg0, TArg1, TArg2)

CompositeFormat Zapisuje ciąg w zakresie znaków, zastępując element formatu lub elementy reprezentacją ciągu odpowiadających argumentów.

TryWrite<TArg0,TArg1>(Span<Char>, IFormatProvider, CompositeFormat, Int32, TArg0, TArg1)

CompositeFormat Zapisuje ciąg w zakresie znaków, zastępując element formatu lub elementy reprezentacją ciągu odpowiadających argumentów.

TryWrite<TArg0>(Span<Char>, IFormatProvider, CompositeFormat, Int32, TArg0)

CompositeFormat Zapisuje ciąg w zakresie znaków, zastępując element formatu lub elementy reprezentacją ciągu odpowiadających argumentów.

TryWrite(Span<Char>, IFormatProvider, CompositeFormat, Int32, Object[])

Źródło:
MemoryExtensions.cs
Źródło:
MemoryExtensions.cs

CompositeFormat Zapisuje ciąg w zakresie znaków, zastępując element formatu lub elementy reprezentacją ciągu odpowiadających argumentów.

public:
[System::Runtime::CompilerServices::Extension]
 static bool TryWrite(Span<char> destination, IFormatProvider ^ provider, System::Text::CompositeFormat ^ format, [Runtime::InteropServices::Out] int % charsWritten, ... cli::array <System::Object ^> ^ args);
public static bool TryWrite (this Span<char> destination, IFormatProvider? provider, System.Text.CompositeFormat format, out int charsWritten, params object?[] args);
static member TryWrite : Span<char> * IFormatProvider * System.Text.CompositeFormat * int * obj[] -> bool
<Extension()>
Public Function TryWrite (destination As Span(Of Char), provider As IFormatProvider, format As CompositeFormat, ByRef charsWritten As Integer, ParamArray args As Object()) As Boolean

Parametry

destination
Span<Char>

Zakres, do którego ma być sformatowany ciąg.

provider
IFormatProvider

Obiekt, który dostarcza informacje o formatowaniu specyficzne dla kultury.

charsWritten
Int32

Gdy ta metoda zostanie zwrócona, zawiera liczbę znaków zapisanych w zakresie.

args
Object[]

Tablica obiektów do sformatowania.

Zwraca

true jeśli cały ciąg interpolowany może zostać sformatowany pomyślnie; w przeciwnym razie , false.

Wyjątki

format lub args to null.

Indeks elementu formatu jest większy lub równy liczbie podanych argumentów.

Dotyczy

TryWrite(Span<Char>, MemoryExtensions+TryWriteInterpolatedStringHandler, Int32)

Źródło:
MemoryExtensions.cs
Źródło:
MemoryExtensions.cs
Źródło:
MemoryExtensions.cs

Zapisuje określony ciąg interpolowany do zakresu znaków.

public:
[System::Runtime::CompilerServices::Extension]
 static bool TryWrite(Span<char> destination, MemoryExtensions::TryWriteInterpolatedStringHandler % handler, [Runtime::InteropServices::Out] int % charsWritten);
public static bool TryWrite (this Span<char> destination, ref MemoryExtensions.TryWriteInterpolatedStringHandler handler, out int charsWritten);
static member TryWrite : Span<char> * TryWriteInterpolatedStringHandler * int -> bool
<Extension()>
Public Function TryWrite (destination As Span(Of Char), ByRef handler As MemoryExtensions.TryWriteInterpolatedStringHandler, ByRef charsWritten As Integer) As Boolean

Parametry

destination
Span<Char>

Zakres, do którego ma być sformatowany ciąg interpolowany.

handler
MemoryExtensions.TryWriteInterpolatedStringHandler

Ciąg interpolowany przekazany przez odwołanie.

charsWritten
Int32

Gdy ta metoda zostanie zwrócona, zawiera liczbę znaków zapisanych w zakresie.

Zwraca

true jeśli cały ciąg interpolowany może zostać sformatowany pomyślnie; w przeciwnym razie , false.

Dotyczy

TryWrite(Span<Char>, IFormatProvider, MemoryExtensions+TryWriteInterpolatedStringHandler, Int32)

Źródło:
MemoryExtensions.cs
Źródło:
MemoryExtensions.cs
Źródło:
MemoryExtensions.cs

Zapisuje określony ciąg interpolowany do zakresu znaków.

public:
[System::Runtime::CompilerServices::Extension]
 static bool TryWrite(Span<char> destination, IFormatProvider ^ provider, MemoryExtensions::TryWriteInterpolatedStringHandler % handler, [Runtime::InteropServices::Out] int % charsWritten);
public static bool TryWrite (this Span<char> destination, IFormatProvider? provider, ref MemoryExtensions.TryWriteInterpolatedStringHandler handler, out int charsWritten);
static member TryWrite : Span<char> * IFormatProvider * TryWriteInterpolatedStringHandler * int -> bool
<Extension()>
Public Function TryWrite (destination As Span(Of Char), provider As IFormatProvider, ByRef handler As MemoryExtensions.TryWriteInterpolatedStringHandler, ByRef charsWritten As Integer) As Boolean

Parametry

destination
Span<Char>

Zakres, do którego ma być sformatowany ciąg interpolowany.

provider
IFormatProvider

Obiekt, który dostarcza informacje o formatowaniu specyficzne dla kultury.

handler
MemoryExtensions.TryWriteInterpolatedStringHandler

Ciąg interpolowany przekazany przez odwołanie.

charsWritten
Int32

Gdy ta metoda zostanie zwrócona, zawiera liczbę znaków zapisanych w zakresie.

Zwraca

true jeśli cały ciąg interpolowany może zostać sformatowany pomyślnie; w przeciwnym razie , false.

Dotyczy

TryWrite(Span<Char>, IFormatProvider, CompositeFormat, Int32, ReadOnlySpan<Object>)

Źródło:
MemoryExtensions.cs
Źródło:
MemoryExtensions.cs

CompositeFormat Zapisuje ciąg w zakresie znaków, zastępując element formatu lub elementy reprezentacją ciągu odpowiadających argumentów.

public:
[System::Runtime::CompilerServices::Extension]
 static bool TryWrite(Span<char> destination, IFormatProvider ^ provider, System::Text::CompositeFormat ^ format, [Runtime::InteropServices::Out] int % charsWritten, ReadOnlySpan<System::Object ^> args);
public static bool TryWrite (this Span<char> destination, IFormatProvider? provider, System.Text.CompositeFormat format, out int charsWritten, ReadOnlySpan<object?> args);
static member TryWrite : Span<char> * IFormatProvider * System.Text.CompositeFormat * int * ReadOnlySpan<obj> -> bool
<Extension()>
Public Function TryWrite (destination As Span(Of Char), provider As IFormatProvider, format As CompositeFormat, ByRef charsWritten As Integer, args As ReadOnlySpan(Of Object)) As Boolean

Parametry

destination
Span<Char>

Zakres, do którego ma być sformatowany ciąg.

provider
IFormatProvider

Obiekt, który dostarcza informacje o formatowaniu specyficzne dla kultury.

charsWritten
Int32

Gdy ta metoda zostanie zwrócona, zawiera liczbę znaków zapisanych w zakresie.

args
ReadOnlySpan<Object>

Zakres obiektów do formatowania.

Zwraca

true jeśli cały ciąg interpolowany może zostać sformatowany pomyślnie; w przeciwnym razie , false.

Wyjątki

format to null.

Indeks elementu formatu jest większy lub równy liczbie podanych argumentów.

Dotyczy

TryWrite<TArg0,TArg1,TArg2>(Span<Char>, IFormatProvider, CompositeFormat, Int32, TArg0, TArg1, TArg2)

Źródło:
MemoryExtensions.cs
Źródło:
MemoryExtensions.cs

CompositeFormat Zapisuje ciąg w zakresie znaków, zastępując element formatu lub elementy reprezentacją ciągu odpowiadających argumentów.

public:
generic <typename TArg0, typename TArg1, typename TArg2>
[System::Runtime::CompilerServices::Extension]
 static bool TryWrite(Span<char> destination, IFormatProvider ^ provider, System::Text::CompositeFormat ^ format, [Runtime::InteropServices::Out] int % charsWritten, TArg0 arg0, TArg1 arg1, TArg2 arg2);
public static bool TryWrite<TArg0,TArg1,TArg2> (this Span<char> destination, IFormatProvider? provider, System.Text.CompositeFormat format, out int charsWritten, TArg0 arg0, TArg1 arg1, TArg2 arg2);
static member TryWrite : Span<char> * IFormatProvider * System.Text.CompositeFormat * int * 'TArg0 * 'TArg1 * 'TArg2 -> bool
<Extension()>
Public Function TryWrite(Of TArg0, TArg1, TArg2) (destination As Span(Of Char), provider As IFormatProvider, format As CompositeFormat, ByRef charsWritten As Integer, arg0 As TArg0, arg1 As TArg1, arg2 As TArg2) As Boolean

Parametry typu

TArg0

Typ pierwszego obiektu do sformatowania.

TArg1

Typ drugiego obiektu do sformatowania.

TArg2

Typ trzeciego obiektu do sformatowania.

Parametry

destination
Span<Char>

Zakres, do którego ma być sformatowany ciąg.

provider
IFormatProvider

Obiekt, który dostarcza informacje o formatowaniu specyficzne dla kultury.

charsWritten
Int32

Gdy ta metoda zostanie zwrócona, zawiera liczbę znaków zapisanych w zakresie.

arg0
TArg0

Pierwszy obiekt do sformatowania.

arg1
TArg1

Drugi obiekt do sformatowania.

arg2
TArg2

Trzeci obiekt do sformatowania.

Zwraca

true jeśli cały ciąg interpolowany może zostać sformatowany pomyślnie; w przeciwnym razie , false.

Wyjątki

format to null.

Indeks elementu formatu jest większy lub równy liczbie podanych argumentów.

Dotyczy

TryWrite<TArg0,TArg1>(Span<Char>, IFormatProvider, CompositeFormat, Int32, TArg0, TArg1)

Źródło:
MemoryExtensions.cs
Źródło:
MemoryExtensions.cs

CompositeFormat Zapisuje ciąg w zakresie znaków, zastępując element formatu lub elementy reprezentacją ciągu odpowiadających argumentów.

public:
generic <typename TArg0, typename TArg1>
[System::Runtime::CompilerServices::Extension]
 static bool TryWrite(Span<char> destination, IFormatProvider ^ provider, System::Text::CompositeFormat ^ format, [Runtime::InteropServices::Out] int % charsWritten, TArg0 arg0, TArg1 arg1);
public static bool TryWrite<TArg0,TArg1> (this Span<char> destination, IFormatProvider? provider, System.Text.CompositeFormat format, out int charsWritten, TArg0 arg0, TArg1 arg1);
static member TryWrite : Span<char> * IFormatProvider * System.Text.CompositeFormat * int * 'TArg0 * 'TArg1 -> bool
<Extension()>
Public Function TryWrite(Of TArg0, TArg1) (destination As Span(Of Char), provider As IFormatProvider, format As CompositeFormat, ByRef charsWritten As Integer, arg0 As TArg0, arg1 As TArg1) As Boolean

Parametry typu

TArg0

Typ pierwszego obiektu do sformatowania.

TArg1

Typ drugiego obiektu do sformatowania.

Parametry

destination
Span<Char>

Zakres, do którego ma być sformatowany ciąg.

provider
IFormatProvider

Obiekt, który dostarcza informacje o formatowaniu specyficzne dla kultury.

charsWritten
Int32

Gdy ta metoda zostanie zwrócona, zawiera liczbę znaków zapisanych w zakresie.

arg0
TArg0

Pierwszy obiekt do sformatowania.

arg1
TArg1

Drugi obiekt do sformatowania.

Zwraca

true jeśli cały ciąg interpolowany może zostać sformatowany pomyślnie; w przeciwnym razie , false.

Wyjątki

format to null.

Indeks elementu formatu jest większy lub równy liczbie podanych argumentów.

Dotyczy

TryWrite<TArg0>(Span<Char>, IFormatProvider, CompositeFormat, Int32, TArg0)

Źródło:
MemoryExtensions.cs
Źródło:
MemoryExtensions.cs

CompositeFormat Zapisuje ciąg w zakresie znaków, zastępując element formatu lub elementy reprezentacją ciągu odpowiadających argumentów.

public:
generic <typename TArg0>
[System::Runtime::CompilerServices::Extension]
 static bool TryWrite(Span<char> destination, IFormatProvider ^ provider, System::Text::CompositeFormat ^ format, [Runtime::InteropServices::Out] int % charsWritten, TArg0 arg0);
public static bool TryWrite<TArg0> (this Span<char> destination, IFormatProvider? provider, System.Text.CompositeFormat format, out int charsWritten, TArg0 arg0);
static member TryWrite : Span<char> * IFormatProvider * System.Text.CompositeFormat * int * 'TArg0 -> bool
<Extension()>
Public Function TryWrite(Of TArg0) (destination As Span(Of Char), provider As IFormatProvider, format As CompositeFormat, ByRef charsWritten As Integer, arg0 As TArg0) As Boolean

Parametry typu

TArg0

Typ obiektu do sformatowania.

Parametry

destination
Span<Char>

Zakres, do którego ma być sformatowany ciąg.

provider
IFormatProvider

Obiekt, który dostarcza informacje o formatowaniu specyficzne dla kultury.

charsWritten
Int32

Gdy ta metoda zostanie zwrócona, zawiera liczbę znaków zapisanych w zakresie.

arg0
TArg0

Obiekt do sformatowania.

Zwraca

true jeśli cały ciąg interpolowany może zostać sformatowany pomyślnie; w przeciwnym razie , false.

Wyjątki

format to null.

Indeks elementu formatu jest większy lub równy liczbie podanych argumentów.

Dotyczy