Newbie Question (VB ASC() and CHR() functions)

G

Gonçalo Boléo

I'm never programming in c# but at work i will now have to do that.
I'm very experimented in VB and some things confuse me a little.

What are the equivalents in c# for ASC and CHR to return de ASCII code of a
character ando to do the inverse process.


thanks,
Gonçalo Boléo
 
O

Oskar Punz

Hi!

...
What are the equivalents in c# for ASC and CHR to return de ASCII
code of a character ando to do the inverse process.

i = ASC("A") is equivalent to
int i = (int) 'A';

c=CHR(65) is equivalent to
char ch = (char) 65;

Bye

Oskar
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top