Version.TryFormat Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| Name | Description |
|---|---|
|
TryFormat(Span |
Tries to format this version instance into a span of characters. |
|
TryFormat(Span |
Tries to format this version instance into a span of bytes. |
|
TryFormat(Span |
Tries to format this version instance into a span of characters. |
|
TryFormat(Span |
Tries to format this version instance into a span of bytes. |
TryFormat(Span, Int32, Int32)
- Source:
- Version.cs
- Source:
- Version.cs
- Source:
- Version.cs
- Source:
- Version.cs
- Source:
- Version.cs
Tries to format this version instance into a span of characters.
public:
bool TryFormat(Span destination, int fieldCount, [Runtime::InteropServices::Out] int % charsWritten);
public bool TryFormat(Span destination, int fieldCount, out int charsWritten);
member this.TryFormat : Span * int * int -> bool
Public Function TryFormat (destination As Span(Of Char), fieldCount As Integer, ByRef charsWritten As Integer) As Boolean
Parameters
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, Int32, Int32)
- Source:
- Version.cs
- Source:
- Version.cs
- Source:
- Version.cs
- Source:
- Version.cs
Tries to format this version instance into a span of bytes.
public:
bool TryFormat(Span utf8Destination, int fieldCount, [Runtime::InteropServices::Out] int % bytesWritten);
public bool TryFormat(Span utf8Destination, int fieldCount, out int bytesWritten);
member this.TryFormat : Span * int * int -> bool
Public Function TryFormat (utf8Destination As Span(Of Byte), fieldCount As Integer, ByRef bytesWritten As Integer) As Boolean
Parameters
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, Int32)
- Source:
- Version.cs
- Source:
- Version.cs
- Source:
- Version.cs
- Source:
- Version.cs
- Source:
- Version.cs
Tries to format this version instance into a span of characters.
public:
bool TryFormat(Span destination, [Runtime::InteropServices::Out] int % charsWritten);
public bool TryFormat(Span destination, out int charsWritten);
member this.TryFormat : Span * int -> bool
Public Function TryFormat (destination As Span(Of Char), ByRef charsWritten As Integer) As Boolean
Parameters
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, Int32)
- Source:
- Version.cs
- Source:
- Version.cs
- Source:
- Version.cs
- Source:
- Version.cs
Tries to format this version instance into a span of bytes.
public:
bool TryFormat(Span utf8Destination, [Runtime::InteropServices::Out] int % bytesWritten);
public bool TryFormat(Span utf8Destination, out int bytesWritten);
member this.TryFormat : Span * int -> bool
Public Function TryFormat (utf8Destination As Span(Of Byte), ByRef bytesWritten As Integer) As Boolean
Parameters
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.