This doesn't answer how to convert the character to its numeric ascii value.
While I'm at it, I'd also like to then convert the resulting number to its
hex equivalent.
This doesn't answer how to convert the character to its numeric ascii
Doesn't System.Encoding get involved here? The string might not be ASCII;
it might be Unicode.
Hex and decimal are not different kinds of numbers. They are different ways
of printing a number. Format strings (String.Format) with the appropriate
specifier can convert a number into the characters that represent it in
either decimal or hex.
All you've got to know is whether a number is above 127 or not, and
there's no need to get Encoding involved to do that
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.