.NET Guid Formats

GUIDs can be a quick (but not secure) way to generate random values in .NET. You can use them in UNIQUEIDENTIFIER columns in SQL Server or the equivalent data type in other database systems.

The framework gives you a few formatting options, depending on what you need it for.

See the documentation for more about the format strings. Or read more than you ever could possibly want to know about GUID/UUID at Wikipedia.

View code on GitHub

Comments

Popular posts from this blog

DotNet CLI

Switch Expressions

Nullable reference types