Converting a string to hexadecimal

  • Thread starter Thread starter Xarky
  • Start date Start date
X

Xarky

Hi,

I need to convert a simple string such as "12", to hexadeciaml. What
method should I use, because I can't find the correct one?

Can someone help me out.
Thanks in Advance
 
int hexCandidate = 12;
string hexadecimalString = hexCandidate.ToString("X");
or
string hexadecimalString = hexCandidate.ToString("x");

try both and see difference...
 

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

Back
Top