I have a custom byte array and it's length 24byte ,I try to transform to string and back again but my result is different.What is the best way to do this.
var z = Guid.NewGuid().ToByteArray();
Random rnd = new Random();
byte[] bytes = new byte[8];
rnd.NextBytes(bytes);
byte[] rv = z.Concat(bytes).ToArray();
string converted = Encoding.UTF8.GetString(rv, 0, rv.Length);//converted string is completely different I cant see my GuidId in this
byte[] rx = Encoding.UTF8.GetBytes(converted);//Transforming code is 44 byte