Language

Guid.TryWriteBytes Method

Definition

Overloads

Name Description
TryWriteBytes(Span)

Tries to write the current GUID instance into a span of bytes.

TryWriteBytes(Span, Boolean, Int32)

Tries to write the current GUID instance into a span of bytes, using the specified endianness.

TryWriteBytes(Span)

Source:
Guid.cs
Source:
Guid.cs
Source:
Guid.cs
Source:
Guid.cs
Source:
Guid.cs

Tries to write the current GUID instance into a span of bytes.

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

Parameters

destination
Span<Byte>

When this method returns, the GUID as a span of bytes.

Returns

true if the GUID is successfully written to the specified span; false otherwise.

Applies to

TryWriteBytes(Span, Boolean, Int32)

Source:
Guid.cs
Source:
Guid.cs
Source:
Guid.cs
Source:
Guid.cs

Tries to write the current GUID instance into a span of bytes, using the specified endianness.

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

Parameters

destination
Span<Byte>

The span in which to write the GUID as a span of bytes.

bigEndian
Boolean

true to write the bytes in big-endian byte order; false to write them in little-endian byte order.

bytesWritten
Int32

When this method returns, contains the number of bytes written into destination.

Returns

true if the GUID is successfully written to the specified span; false otherwise.

Applies to