Is it good idea to remove dash from a GUID? Is it good idea to remove dash from a GUID? asp.net asp.net

Is it good idea to remove dash from a GUID?


The dashes are always in the same place, so no, it will not reduce the uniqueness.

System.Guid.NewGuid().ToString("N");

Will generate a GUID without dashes, as in this documentation


Yes, it is OK to remove the dashes. The uniqueness of the Guid is guaranteed.

Dashes are only for readability: internally the Guid is made of 16 bytes.
You can see Microsoft and Wikipedia for more details.
Take a look at constructors too:

public Guid(int a, short b, short c, byte[] d);public Guid(int a, short b, short c, byte d,             byte e, byte f, byte g, byte h,             byte i, bytepublic Guid(uint a, ushort b, ushort c, byte d,             byte e, byte f, byte g, byte h,             byte i, byte j, byte k);


The dashes are not part of the guid itself. They are just part of a common representation of guids. So the removal won't change the Guid value itself.