Guid.TryWriteBytes 方法

定義

多載

名稱 Description
TryWriteBytes(Span<Byte>)

嘗試將目前的 GUID 實例寫入一個位元組區間。

TryWriteBytes(Span<Byte>, Boolean, Int32)

嘗試將目前的 GUID 實例寫入一個位元組區間,並使用指定的字節序。

TryWriteBytes(Span<Byte>)

來源:
Guid.cs
來源:
Guid.cs
來源:
Guid.cs
來源:
Guid.cs
來源:
Guid.cs

嘗試將目前的 GUID 實例寫入一個位元組區間。

public:
 bool TryWriteBytes(Span<System::Byte> destination);
public bool TryWriteBytes(Span<byte> destination);
member this.TryWriteBytes : Span<byte> -> bool
Public Function TryWriteBytes (destination As Span(Of Byte)) As Boolean

參數

destination
Span<Byte>

當此方法回傳時,GUID 會以位元組區段的形式呈現。

傳回

true 若 GUID 成功寫入指定範圍; false 否則,

適用於

TryWriteBytes(Span<Byte>, Boolean, Int32)

來源:
Guid.cs
來源:
Guid.cs
來源:
Guid.cs
來源:
Guid.cs

嘗試將目前的 GUID 實例寫入一個位元組區間,並使用指定的字節序。

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

參數

destination
Span<Byte>

將 GUID 寫入為位元組區間的區間。

bigEndian
Boolean

true 以大端序位元組順序寫入位元組; false 以小端位元組順序寫入。

bytesWritten
Int32

當此方法回傳時,包含寫入 destination的位元組數。

傳回

true 若 GUID 成功寫入指定範圍; false 否則,

適用於