CONVERTING HEX TO INTEGER IN C#

jayprakash sharma

Total Post:117

Points:821
Posted by  jayprakash sharma
C# 
C#
 1608  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. AVADHESH PATEL

    Post:604

    Points:4228
    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

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!