convert a number to its ascii value

  • Thread starter Thread starter questions
  • Start date Start date
Q

questions

How do I convert a number to its ascii value in c#?
What is the equivalent of VB's chr() function in c#?

thanks in advance
 
questions said:
How do I convert a number to its ascii value in c#?
What is the equivalent of VB's chr() function in c#?

Just cast it to an int, or assign it to an int variable.
 
questions said:
How do I convert a number to its ascii value in c#?
What is the equivalent of VB's chr() function in c#?

Sorry, my previous answer was character -> Unicode value. To get from
Unicode value -> character, just cast to char:

int i = 65;

char c = (char) i; // c now equals 'A'
 
Back
Top