Method ToHexString NamespaceMongoDB.Bson AssemblyMongoDB.Bson.dll ToHexString(byte[]) Converts a byte array to a hex string. public static string ToHexString(byte[] bytes) Parameters bytes byte[] The byte array. Returns string A hex string.