public static string GetString(byte[] bytes) { if (bytes == null) { throw new ArgumentNullException("bytes"); } char[] chars = new char[bytes.Length / sizeof(char)]; Buffer.BlockCopy(bytes, 0, chars, 0, bytes.Length); return new string(chars); }