polamin
3/12/2017 - 6:34 PM

Hex To Decimal this can work with negative hex

Hex To Decimal this can work with negative hex

var n = Convert.ToInt32(hexString.Replace("-", ""), 16);
return hexString.StartsWith("-") ? n * -1 : n;