Veröffentlicht: 11.11.2009

.NET: Hex to Char / Char to Hex

// Hex to Char -> Ergebnis: A
char c = (char)Convert.ToInt32("0x41", 16);

// Char to Hex -> Ergebnis: 0x41
string hex = "0x" + Convert.ToInt32('A').ToString("X");