Guid.CreateVersion7 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
| 名稱 | Description |
|---|---|
| CreateVersion7() |
依據 RFC 9562 依照第 7 版格式建立新 Guid 版本。 |
| CreateVersion7(DateTimeOffset) |
依據 RFC 9562 依照第 7 版格式建立新 Guid 版本。 |
CreateVersion7()
- 來源:
- Guid.cs
- 來源:
- Guid.cs
- 來源:
- Guid.cs
依據 RFC 9562 依照第 7 版格式建立新 Guid 版本。
public:
static Guid CreateVersion7();
public static Guid CreateVersion7();
static member CreateVersion7 : unit -> Guid
Public Shared Function CreateVersion7 () As Guid
傳回
根據 RFC 9562,這是新版本 Guid ,遵循第 7 版格式。
備註
此方法用於 UtcNow 確定 Unix 時代戳記來源。
此方法將隨機資料種子植入rand_a與rand_b子欄位。
適用於
CreateVersion7(DateTimeOffset)
- 來源:
- Guid.cs
- 來源:
- Guid.cs
- 來源:
- Guid.cs
依據 RFC 9562 依照第 7 版格式建立新 Guid 版本。
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
參數
- timestamp
- DateTimeOffset
用於決定 Unix 紀元時間戳的日期-時間偏移量。
傳回
根據 RFC 9562,這是新版本 Guid ,遵循第 7 版格式。
例外狀況
timestamp 代表在 之前 UnixEpoch的偏移量。
備註
此方法將隨機資料種子植入rand_a與rand_b子欄位。