border
Fast Splash Screen in English Fast Splash Screen po Slovensky
Main page | C# section | VB6 section | PHP section | MySQL section | Supremus.sk



How to convert Hex number in string to Int in C#


String conversion Hex to Int in C#

If we have hex number in string and we want to have it in int, that we can use this function:

Convert.ToInt32(MyString, 16);

Example in C#:
    int intMyInt;
    string strMyHex = "FB823C";

    intMyInt = Convert.ToInt32(strMyHex, 16);
    //hex number 0xFB823C is 16482876 in decimal, and this value will be in intMyInt




Comments

There are no comments for this article.

Add your comment, and be first.


Add your comment
User language:

Name:

Subject:





Human verification:
Number 61 is

separator

List of articles

How to compare two Strings in C#
SharpDevelop - how to change 'File version'
How to delete file in C#
How to convert String to Int in C#
How to use Hexadecimal numbers in C#
How to convert Hex number to Int in C#

Smart utilities


Webdesign (c) 2009 - 2024 Supremus.sk
border