StringWriter sw = new StringWriter();
int iTest = 234234;
sw.Write(iTest.ToString("X"));
Be aware that the numeric formatter is subject to your thread's current culture. Probably not a problem with hexadecimal, but if you were using the "N" formatter specification, the German culture would use decimal points for thousand-separators, and a comma for the decimal point.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.