Tuesday, December 10, 2019

You may cast numbers back to characters in C#.

Obviously you may do something like so to get the number 120.

char x = 'x';
int number = (int)x;

 
 

I would offer that this is also legit for getting \r

char enter = (char)13;

No comments:

Post a Comment