Creating a Safer Guid

Guids (Globally Unique Identifers) are great. They are very useful when uniqueness is important, maybe for identification later on. They are fairly efficient to create and are even human readable. So yeah, Guids are pretty great… except when they aren’t. A common use case for a Guid (for me at least) is to receive it as a set of characters and then convert it to an actual Guid (in C#). This usually looks like this: public void CallWithGuidAsString(string guid) { Guid newGuid = new Guid(guid); // Do stuff with guid. } The issue with this is that it is not Continue reading Creating a Safer Guid