Version.TryFormat 方法

定義

多載

TryFormat(Span<Char>, Int32, Int32)

嘗試將此版本執行個體格式化為字元延伸。

TryFormat(Span<Byte>, Int32, Int32)

嘗試將此版本實例格式化為位元組範圍。

TryFormat(Span<Char>, Int32)

嘗試將此版本執行個體格式化為字元延伸。

TryFormat(Span<Byte>, Int32)

嘗試將此版本實例格式化為位元組範圍。

TryFormat(Span<Char>, Int32, Int32)

來源:
Version.cs
來源:
Version.cs
來源:
Version.cs

嘗試將此版本執行個體格式化為字元延伸。

public:
 bool TryFormat(Span<char> destination, int fieldCount, [Runtime::InteropServices::Out] int % charsWritten);
public bool TryFormat (Span<char> destination, int fieldCount, out int charsWritten);
member this.TryFormat : Span<char> * int * int -> bool
Public Function TryFormat (destination As Span(Of Char), fieldCount As Integer, ByRef charsWritten As Integer) As Boolean

參數

destination
Span<Char>

要在其中寫入此實例值的範圍,其格式為字元範圍。

fieldCount
Int32

要傳回的元件數目。 值的範圍介於 0 到 4 之間。

charsWritten
Int32

當這個方法傳回時,會包含以 寫入 destination 的字元數。

傳回

若格式化成功則為 true,否則為 false

適用於

TryFormat(Span<Byte>, Int32, Int32)

來源:
Version.cs
來源:
Version.cs

嘗試將此版本實例格式化為位元組範圍。

public:
 bool TryFormat(Span<System::Byte> utf8Destination, int fieldCount, [Runtime::InteropServices::Out] int % bytesWritten);
public bool TryFormat (Span<byte> utf8Destination, int fieldCount, out int bytesWritten);
member this.TryFormat : Span<byte> * int * int -> bool
Public Function TryFormat (utf8Destination As Span(Of Byte), fieldCount As Integer, ByRef bytesWritten As Integer) As Boolean

參數

utf8Destination
Span<Byte>

要在其中寫入這個實例值的範圍,其格式為 UTF-8 位元組的範圍。

fieldCount
Int32

要傳回的元件數目。 值的範圍介於 0 到 4 之間。

bytesWritten
Int32

當這個方法傳回時,包含以 寫入 utf8Destination 的位元組數目。

傳回

若格式化成功則為 true,否則為 false

適用於

TryFormat(Span<Char>, Int32)

來源:
Version.cs
來源:
Version.cs
來源:
Version.cs

嘗試將此版本執行個體格式化為字元延伸。

public:
 bool TryFormat(Span<char> destination, [Runtime::InteropServices::Out] int % charsWritten);
public bool TryFormat (Span<char> destination, out int charsWritten);
member this.TryFormat : Span<char> * int -> bool
Public Function TryFormat (destination As Span(Of Char), ByRef charsWritten As Integer) As Boolean

參數

destination
Span<Char>

要在其中寫入此實例值的範圍,其格式為字元範圍。

charsWritten
Int32

當這個方法傳回時,會包含以 寫入 destination 的字元數。

傳回

若格式化成功則為 true,否則為 false

適用於

TryFormat(Span<Byte>, Int32)

來源:
Version.cs
來源:
Version.cs

嘗試將此版本實例格式化為位元組範圍。

public:
 bool TryFormat(Span<System::Byte> utf8Destination, [Runtime::InteropServices::Out] int % bytesWritten);
public bool TryFormat (Span<byte> utf8Destination, out int bytesWritten);
member this.TryFormat : Span<byte> * int -> bool
Public Function TryFormat (utf8Destination As Span(Of Byte), ByRef bytesWritten As Integer) As Boolean

參數

utf8Destination
Span<Byte>

要在其中寫入這個實例值的範圍,其格式為 UTF-8 位元組的範圍。

bytesWritten
Int32

當這個方法傳回時,包含以 寫入 utf8Destination 的位元組數目。

傳回

若格式化成功則為 true,否則為 false

適用於