How GUID is generated in c#

244 View    Jan 19 2020 12:43AM

Typically, we use GUID for uniqueness in the venture. Before we start, let us find out about GUID - what it is and how to make it. On the off chance that you know these answers, do you ever consider how it's really made?

Thus, first, we should begin with what GUID is.

GUID represents Globally Unique Identifier or UUID which represents Universally Unique Identifier. Regularly, Microsoft innovation engineers work with GUID and REST designers work with UUID. 16 bytes (128 bits) is satisfactory for uniqueness.

How to create GUID?


You can create GUID by using the below line.

var guid = Guid.NewGuid(); 

There are many methods for GUID which you can use as per your need.


How to create GUID in C#?