Created
December 2, 2024 13:59
-
-
Save renatogroffe/193b8e70fb79d9236829dbf2cbb11048 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
List<Guid> guidsV7Utc = new(); | |
for (int i = 1; i <= 5; i++) | |
{ | |
var guid = Guid.CreateVersion7(DateTimeOffset.UtcNow); | |
guidsV7Utc.Add(guid); | |
Console.WriteLine($"{guid} - versao {guid.Version}"); | |
Thread.Sleep(1000); | |
} | |
Console.WriteLine(); | |
Console.WriteLine($"Guids V7 UTC: {JsonSerializer.Serialize(guidsV7Utc)}"); | |
Console.WriteLine(); | |
Console.WriteLine($"Guids V7 UTC - Order(): {JsonSerializer.Serialize(guidsV7Utc.Order())}"); | |
Console.WriteLine(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment