Posted on

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

Leave a Reply

Your email address will not be published. Required fields are marked *