Wednesday, December 19, 2012

C# Convert Hex to Decimal and vice versa

Convert Hex to Decimal as below;
 
int DecimalVal = Convert.ToInt32(HexVal, 16);
Convert Decimal to Hex as below;
 
string HexVal = DecimalVal .ToString("X");

1 comment: