Skip to content

Instantly share code, notes, and snippets.

@renatogroffe
Created December 2, 2024 12:54
Show Gist options
  • Save renatogroffe/7536af665de979ec995211ff5b3f5fd1 to your computer and use it in GitHub Desktop.
Save renatogroffe/7536af665de979ec995211ff5b3f5fd1 to your computer and use it in GitHub Desktop.
List<Guid> guidsV7 = new();
for (int i = 1; i <= 5; i++)
{
var guid = Guid.CreateVersion7();
guidsV7.Add(guid);
Console.WriteLine($"{guid} - versao {guid.Version}");
Thread.Sleep(1000);
}
Console.WriteLine();
Console.WriteLine($"Guids V7: {JsonSerializer.Serialize(guidsV7)}");
Console.WriteLine();
Console.WriteLine($"Guids V7 - Order(): {JsonSerializer.Serialize(guidsV7.Order())}");
Console.WriteLine();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment