Advertise with us

Converting Hex to integer in C#

Posted by  jayprakash sharma
C# 
C#
 2312  View(s)
Ratings:
Rate this:

Hi Everyone!

I want to convert Hex value into Integer in C#. How it is possible? I'm try to convert Hex value into integer as below line of code but it generate error "Some String Builder Problems".

My line of code

int x =(Value.ToString("x"));

Please help me!

Thanks in advance

  1. Re: Converting Hex to integer in C#

    Hi Jayprakash Sharma!

    You can convert Hex value into integer like this

    int iValue = Convert.ToInt32("17da06f1", 16);

Answer