Skip to content

Instantly share code, notes, and snippets.

Created May 31, 2016
What would you like to do?
Convert from GUID to UUID
var guid = Guid.Parse("10a5be07-e2ba-46fa-bb18-273f77dc39f0");
var b = guid.ToByteArray();
var mirror = guid.ToByteArray();
b[0] = mirror[3];
b[1] = mirror[2];
b[2] = mirror[1];
b[3] = mirror[0];
b[4] = mirror[5];
b[5] = mirror[4];
b[6] = mirror[7];
b[7] = mirror[6];
foreach (var byt in b)
Console.Write("{0:X2}", byt);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment