To convert a Hexadecimal to a number we can use an overload of Convert.ToInt32 method.

Convert.ToInt32

Using the overload I can convert for example hex string “BB” to a number.

int number = Convert.ToInt32("BB", 16);

And the number variable gets assigned value of 187.

Tagged with:
 

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>