Hi all,
Any hints on parsing / converting / operating on hex values in c# ?
In particular I want to cast a decimal int to hex and then output as a string...
Hi all,
Any hints on parsing / converting / operating on hex values in c# ?
In particular I want to cast a decimal int to hex and then output as a string...
Int32 decValue = 42;
string hexValue = decValue.ToString("X");
Int32 decValue2 = Int32.Parse(hexValue, System.Globalization.NumberStyles.HexNumber);
See this post:
http://stackoverflow.com/questions/74148/how-to-convert-numbers-between-hex-and-decimal-in-c