Version.TryFormat 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
| 名称 | 说明 |
|---|---|
| TryFormat(Span<Char>, Int32, Int32) |
尝试将此版本实例格式化为字符范围。 |
| TryFormat(Span<Byte>, Int32, Int32) |
尝试将此版本实例格式化为字节范围。 |
| TryFormat(Span<Char>, Int32) |
尝试将此版本实例格式化为字符范围。 |
| TryFormat(Span<Byte>, Int32) |
尝试将此版本实例格式化为字节范围。 |
TryFormat(Span<Char>, Int32, Int32)
- Source:
- Version.cs
- Source:
- Version.cs
- Source:
- Version.cs
- Source:
- Version.cs
- Source:
- 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
参数
- fieldCount
- Int32
要返回的组件数。 此值范围为 0 到 4。
- charsWritten
- Int32
此方法返回时,包含写入 destination的字符数。
返回
true 如果格式设置成功,则为否则,为 false.
适用于
TryFormat(Span<Byte>, Int32, Int32)
- Source:
- Version.cs
- Source:
- Version.cs
- Source:
- Version.cs
- Source:
- 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
参数
- fieldCount
- Int32
要返回的组件数。 此值范围为 0 到 4。
- bytesWritten
- Int32
此方法返回时,包含写入 utf8Destination的字节数。
返回
true 如果格式设置成功,则为否则,为 false.
适用于
TryFormat(Span<Char>, Int32)
- Source:
- Version.cs
- Source:
- Version.cs
- Source:
- Version.cs
- Source:
- Version.cs
- Source:
- 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
参数
- charsWritten
- Int32
此方法返回时,包含写入 destination的字符数。
返回
true 如果格式设置成功,则为否则,为 false.
适用于
TryFormat(Span<Byte>, Int32)
- Source:
- Version.cs
- Source:
- Version.cs
- Source:
- Version.cs
- Source:
- 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
参数
- bytesWritten
- Int32
此方法返回时,包含写入 utf8Destination的字节数。
返回
true 如果格式设置成功,则为否则,为 false.