G
Gary Stark
I'm sure that this is something very simple.
I need to convert a string of a decimal number to a string of the
equivalent hex value so that "10" should equate to "0A", and so on.
With the following code
int nLen;
string cRet;
nLen = 10
cRet = int.Parse( nLen.ToString(),
System.Globalization.NumberStyles.HexNumber );
cRet is assigned a value of "16". I'm reading into this that the value
is being treated as if it's already a hex value, and is being converted
back to decimal - the reverse of what I want to do.
What am I missing here? Nothing is jumping out at me from the help
files. What class and method do I use for this?
I need to convert a string of a decimal number to a string of the
equivalent hex value so that "10" should equate to "0A", and so on.
With the following code
int nLen;
string cRet;
nLen = 10
cRet = int.Parse( nLen.ToString(),
System.Globalization.NumberStyles.HexNumber );
cRet is assigned a value of "16". I'm reading into this that the value
is being treated as if it's already a hex value, and is being converted
back to decimal - the reverse of what I want to do.
What am I missing here? Nothing is jumping out at me from the help
files. What class and method do I use for this?