|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Convert ascii code to stringI am working on an app that is receiving hex numerical values via serial connection. I am now to the point that I have converted each byte into its ascii code value. Could comeone please tell me how to convert 48 to 0, 49 to 1, etc? I need to display this in a textbox.
Thanks in advance for any and all help. Daniel Passwater via DotNetMonster.com <fo***@DotNetMonster.com> wrote:
> I am working on an app that is receiving hex numerical values via If you've got an array of such bytes, the easiest way is to use > serial connection. I am now to the point that I have converted each > byte into its ascii code value. Could comeone please tell me how to > convert 48 to 0, 49 to 1, etc? I need to display this in a textbox. Encoding.ASCII.GetString (theByteArray); To convert a single byte into a string, use ((char)theByte).ToString(); -- Jon Skeet - <sk***@pobox.com> http://www.pobox.com/~skeet If replying to the group, please do not mail me too |
|||||||||||||||||||||||