int 2 Hex

P

Pablo Salazar

Hi, I need Help

How do it change an int value to hex value?

THX.

Pablo Salazar.
 
M

Marco Martin

Hi Pablo,

There are many ways to convert to Hex value.

This should get you started;
// Should be "7B"
String str = 123.ToString("X");

or the int.Parse function
// Should be 291
int num = int.Parse("123", System.Globalization.NumberStyles.HexNumber);

Hope this helps

Marco
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top