|
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
Add your comment
|
List of articles
How to compare two Strings in C# Smart utilities |
Webdesign (c) 2009 - 2024 Supremus.sk |