Guid.TryWriteBytes Method

Definition

Overloads

TryWriteBytes(Span<Byte>)

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

TryWriteBytes(Span<Byte>, Boolean, Int32)

TryWriteBytes(Span<Byte>)

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<byte> destination);

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

.NET 9 and other versions
Product Versions
.NET Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Standard 2.1

TryWriteBytes(Span<Byte>, Boolean, Int32)

Source:
Guid.cs
Source:
Guid.cs
public bool TryWriteBytes (Span<byte> destination, bool bigEndian, out int bytesWritten);

Parameters

destination
Span<Byte>
bigEndian
Boolean
bytesWritten
Int32

Returns

Applies to

.NET 9 and .NET 8
Product Versions
.NET 8, 9