Version.TryFormat Method

Definition

Overloads

TryFormat(Span<Char>, Int32, Int32)

Tries to format this version instance into a span of characters.

TryFormat(Span<Byte>, Int32, Int32)

Tries to format this version instance into a span of bytes.

TryFormat(Span<Char>, Int32)

Tries to format this version instance into a span of characters.

TryFormat(Span<Byte>, Int32)

Tries to format this version instance into a span of bytes.

TryFormat(Span<Char>, Int32, Int32)

Source:
Version.cs
Source:
Version.cs
Source:
Version.cs

Tries to format this version instance into a span of characters.

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

Parameters

destination
Span<Char>

The span in which to write this instance's value formatted as a span of characters.

fieldCount
Int32

The number of components to return. This value ranges from 0 to 4.

charsWritten
Int32

When this method returns, contains the number of characters that were written in destination.

Returns

true if the formatting was successful; otherwise, false.

Applies to

TryFormat(Span<Byte>, Int32, Int32)

Source:
Version.cs
Source:
Version.cs

Tries to format this version instance into a span of bytes.

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

Parameters

utf8Destination
Span<Byte>

The span in which to write this instance's value formatted as a span of UTF-8 bytes.

fieldCount
Int32

The number of components to return. This value ranges from 0 to 4.

bytesWritten
Int32

When this method returns, contains the number of bytes that were written in utf8Destination.

Returns

true if the formatting was successful; otherwise, false.

Applies to

TryFormat(Span<Char>, Int32)

Source:
Version.cs
Source:
Version.cs
Source:
Version.cs

Tries to format this version instance into a span of characters.

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

Parameters

destination
Span<Char>

The span in which to write this instance's value formatted as a span of characters.

charsWritten
Int32

When this method returns, contains the number of characters that were written in destination.

Returns

true if the formatting was successful; otherwise, false.

Applies to

TryFormat(Span<Byte>, Int32)

Source:
Version.cs
Source:
Version.cs

Tries to format this version instance into a span of bytes.

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

Parameters

utf8Destination
Span<Byte>

The span in which to write this instance's value formatted as a span of UTF-8 bytes.

bytesWritten
Int32

When this method returns, contains the number of bytes that were written in utf8Destination.

Returns

true if the formatting was successful; otherwise, false.

Applies to