Rediger

Del via


Guid.CreateVersion7 Method

Definition

Overloads

CreateVersion7()

Creates a new Guid according to RFC 9562, following the Version 7 format.

CreateVersion7(DateTimeOffset)

Creates a new Guid according to RFC 9562, following the Version 7 format.

CreateVersion7()

Creates a new Guid according to RFC 9562, following the Version 7 format.

public:
 static Guid CreateVersion7();
public static Guid CreateVersion7 ();
static member CreateVersion7 : unit -> Guid
Public Shared Function CreateVersion7 () As Guid

Returns

A new Guid according to RFC 9562, following the Version 7 format.

Remarks

This method uses UtcNow to determine the Unix Epoch timestamp source.

This method seeds the rand_a and rand_b sub-fields with random data.

Applies to

CreateVersion7(DateTimeOffset)

Creates a new Guid according to RFC 9562, following the Version 7 format.

public:
 static Guid CreateVersion7(DateTimeOffset timestamp);
public static Guid CreateVersion7 (DateTimeOffset timestamp);
static member CreateVersion7 : DateTimeOffset -> Guid
Public Shared Function CreateVersion7 (timestamp As DateTimeOffset) As Guid

Parameters

timestamp
DateTimeOffset

The date-time offset used to determine the Unix Epoch timestamp.

Returns

A new Guid according to RFC 9562, following the Version 7 format.

Exceptions

timestamp represents an offset prior to UnixEpoch.

Remarks

This method seeds the rand_a and rand_b sub-fields with random data.

Applies to