Shakster, if your array was created with some specific encoding (e.g. ASCII) then you could simply retrieve the string using the same encoding and replace your 0x00 values later (if you still need to do so). 0x00 does have a string representation, in ASCII, and that's '\0'.
For instance:
byte [] mybytes = { 0x30, 0x31, 0x32, 0x33, 0x00, 0x30, 0x31, 0x32, 0x00, 0x30, 0x31, 0x32 }; string result = Encoding.ASCII.GetString (mybytes).Replace ('\0', ' ');
I'm not claiming this is more efficient than what has been advised before... just slightly shorter to write.
HTH --mc |