I am trying to convert a text string in to hex values. I am at a loss
of how to get this done. I am also some what new to VC I have worked in
Unix C for a while though.
I am been searching the web for this but can't find the solution I am
looking for.
For example I need to convert the following
ATL100
to the hex equivlent string.
41544C 3130 30
A function or something would be helpful.
Well, if you are will to accept dashes in the string, it's just :
string input = "ATL100";
string output =
BitConverter.ToString(System.Text.Encoding.ASCII.GetBytes(input));
Console.WriteLine(output);
41-54-4C-31-30-30

Signature
Truth,
James Curran
[erstwhile VC++ MVP]
Home: www.noveltheory.com Work: www.njtheater.com
Blog: www.honestillusion.com Day Job: www.partsearch.com
> I am trying to convert a text string in to hex values. I am at a loss
> of how to get this done. I am also some what new to VC I have worked in
[quoted text clipped - 12 lines]
>
> A function or something would be helpful.