I was reading the NHibernate docs:
Section 3.1.4.4 wrote:
The UUID is generated by calling Guid.NewGuid().ToByteArray() and then converting the byte[] into a char[]. The char[] is returned as a String consisting of 16 characters.
A few questions:
1. Why use ToByteArray etc... and not .ToString("N") ?? seems like ToString would be faster
2. Why 16 chars and not the full 32 ?? Using 16 makes comparing guids visually somewhat difficult since most of the time you'll be looking at 32 caracters. Granted, I hope to never have to visually compare these - but when writing test cases I would have to do the same ToByteArray junk just to get a working test....