Pregunta

¿Alguna pista sobre el análisis / conversión / operación en valores hexadecimales en c #?

En particular, quiero convertir un int decimal en hexadecimal y luego mostrarlo como una cadena ...

¿Fue útil?

Solución

Int32 decValue = 42;
string hexValue = decValue.ToString("X");

Int32 decValue2 = Int32.Parse(hexValue, System.Globalization.NumberStyles.HexNumber);

Ver esta publicación:

Cómo convertir números entre hexadecimal y decimal en C #?

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top