mpen
mpen

Reputation: 283313

Hexadecimal string to character?

Given a string like "5A" I want to get the character represented by that hexadecimal value. In this case, Z. How would I do that?

Upvotes: 2

Views: 115

Answers (1)

Adriaan Stander
Adriaan Stander

Reputation: 166566

How about something like

char charVal = (char)int.Parse("5A", NumberStyles.AllowHexSpecifier);

Upvotes: 6

Related Questions