Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 204
  • Last Modified:

Creating a char from a number

There are 255 characters in the ascii code right?  well I'd like to know how to programatically get a char based on a number I give.

i.e. if I give it 16 then the letter A pops out (I'm sure that not right but you get the gyst)

Thanks
0
jayrod
Asked:
jayrod
  • 2
1 Solution
 
NetworkArchitekCommented:
Ok so given a number you can do this

int i = 16;
char myChar = Convert.toChar(i);

You can also do the opposite with Convert.toInt()

Hope this helps.
0
 
jayrodAuthor Commented:
yep... thought it might have been that easy..

What are the limits? 0 to what? 255?

Thanks again
0
 
NetworkArchitekCommented:
Oh, no defintiely not 255, it accepts extended codes as well. I don't know the upper limit. But definitely much more than 255
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now