Ascii conversion in C#

  • Thread starter Thread starter Aparna Sinha via .NET 247
  • Start date Start date
A

Aparna Sinha via .NET 247

Dear All,
How do we get ascii equivalent of any character in C#.Please give a C# example with relevant name spaces..
 
Try posting this question to the microsoft.public.dotnet.languages.vc
I think you'll get your answer quicker.
This is the VB.NET newsgroup.

Hope this helps,



Aparna Sinha via .NET 247 said:
Dear All,
How do we get ascii equivalent of any character in C#.Please give a C#
example with relevant name spaces..
 
You can cast a character as an integer and it will do the ASCII
conversion. Something like this:

MessageBox.Show(((int) 'A').ToString());
 

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

Back
Top