تقييم الموضوع :
  • 0 أصوات - بمعدل 0
  • 1
  • 2
  • 3
  • 4
  • 5
التحويل من ال Hexadecimal to Decimal و بالعكس
#1
كاتب الموضوع : Boutemine Oualid

السلام عليكم و رحمة الله و بركاته


كود :
// Hexadecimal to Decimal
public static int HexToDec(string hexValue)
{
return Int32.Parse(hexValue, System.Globalization.NumberStyles.HexNumber);
}
// Decimal to Hexadecimal
public static string DecToHex(int decValue)
{
return string.Format("{0:x}", decValue);
}

string hex = DecToHex(15);
int dec = HexToDec("f");
}}}
تم الشكر بواسطة:



التنقل السريع :


يقوم بقرائة الموضوع: بالاضافة الى ( 1 ) ضيف كريم