RobertFromSecretWeapons
asked on
Converting Byte Value to ASCII printable character
Hi All,
I need a method that converts a Byte to a printable character.
I know this seems stupid, I just can't find a method that does this.
I have an array of bytes:
Dim ByteArray() as Byte = { &H48, &H54, &H54, &H50 }
String.Format("{0}", ByteArray(0).ToString)
When I use the ByteArray(0).ToString function, I get the decimal value printed instead of the actual character like "H".
I need a method that converts a Byte to a printable character.
I know this seems stupid, I just can't find a method that does this.
I have an array of bytes:
Dim ByteArray() as Byte = { &H48, &H54, &H54, &H50 }
String.Format("{0}", ByteArray(0).ToString)
When I use the ByteArray(0).ToString function, I get the decimal value printed instead of the actual character like "H".
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
*I like kaufmed's answer better though.
ASKER
Thx so much. All very good and usable suggestions.