int x=4;
char c=(char)x;
it would not print ‘4’ on screen. It would display the ASCII corresponding value of ‘4’.
I tried this way…
int x=48;
string str =x.ToString();
char c=str[0];//for printing 4;
char c1=str[1];// for printing 8;
I am writing my experiences and learning to help others
int x=4;
char c=(char)x;
it would not print ‘4’ on screen. It would display the ASCII corresponding value of ‘4’.
I tried this way…
int x=48;
string str =x.ToString();
char c=str[0];//for printing 4;
char c1=str[1];// for printing 8;