Answers for "hex string to int c#"

C#
1

hex string to int c#

string hex = "142CBD";
// this returns 1322173
int intValue = int.Parse(hex, System.Globalization.NumberStyles.HexNumber);
Posted by: Guest on August-19-2020
0

hex string to int c#

string prefixedHex = "0x142CBD";
// this works, and returns 1322173
int intValue = Convert.ToInt32(prefixedHex , 16);
Posted by: Guest on August-19-2020

C# Answers by Framework

Browse Popular Code Answers by Language