OK so I don't get yelled at I did search the forums and there is a very similar question, I'm just having a little difficulty understanding what is meant.
I'm generating a random number in decimal, checking to see if it matches a certain exclusion range for characters I don't want to print, if it does not match the exclusion range, I save the int and I want to send it to the char to be printed.
I don't know how to tell visual studio to print the decimal integer 65 as the char "A" heres my code:
int asciVal = rnd.Next(33, 96);
if (asciVal == 48 || asciVal == 49 || asciVal == 50 || asciVal == 51 || asciVal == 52 || asciVal == 53 || asciVal == 54 || asciVal == 55 || asciVal == 56 || asciVal == 57 || asciVal == 65 || asciVal == 66 || asciVal == 67 || asciVal == 68 || asciVal == 69 || asciVal == 70 || asciVal == 71 || asciVal == 72 || asciVal == 73 || asciVal == 74 || asciVal == 75 || asciVal == 76 || asciVal == 77 || asciVal == 78 || asciVal == 79 || asciVal == 80 || asciVal == 81 || asciVal == 82 || asciVal == 83 || asciVal == 84 || asciVal == 85 || asciVal == 86 || asciVal == 87 || asciVal == 88 || asciVal == 89 || asciVal == 90)
loop = 1;
else {
loop = 0;
Text = asciVal;
}
ifstatement:if ((asciVal >= 48 && asciVal <= 57) || (asciVal >= 65 && asciVal <= 90)). Much more readable than a long line of or statements.char(Unicode/UTF-16 code unit). They are correct because you aren't actually using ASCII. Take what you know about ASCII and port it to Unicode, learn a bit more and then forget ASCII.