How to Combine Two GUID Values
问题 I want to combine two guid values and generate a 32 bit alphanumberic value(It can be done by using hashing). 回答1: Not Pretty, but it works.. private static Guid MungeTwoGuids(Guid guid1, Guid guid2) { const int BYTECOUNT = 16; byte[] destByte = new byte[BYTECOUNT]; byte[] guid1Byte = guid1.ToByteArray(); byte[] guid2Byte = guid2.ToByteArray(); for (int i = 0; i < BYTECOUNT; i++) { destByte[i] = (byte) (guid1Byte[i] ^ guid2Byte[i]); } return new Guid(destByte); } and yes, I can deal with the