How to

convert integer to hexadecimal number

Published: 19. October 2011 | Updated: 26. October 2011
License: Microsoft Public License (MS-PL)
Categories: Converting » Numbers
Tags: C# Conversion Formatting Math
Was this snippet helpful for you? YESYES / NONO
int integer = 58;
string hexadecimal = integer.ToString("X");

Console.WriteLine(hexadecimal);
Console Output:
3A
Send us feedback about this snippet »



Related Snippets: