Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ASCII value of a character in C#
Message
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00822448
Message ID:
00822467
Views:
13
Hi Allan,

Here is two different ways to do this in C#:
char a = 'A';
int asc = a; // First way
int asc2 = Convert.ToInt32(a); // Second way
>In VB, this works
>
>Dim MyInt As Integer
>MyInt = Asc("A") ' MyInt is set to 65.
>
>How do I do this in C#?
-----------------------------------------

Cathi Gero, CPA
Prenia Software & Consulting Services
Microsoft C# / .NET MVP
Mere Mortals for .NET MVP
cgero@prenia.com
www.prenia.com
Weblog: blogs.prenia.com/cathi
Previous
Reply
Map
View

Click here to load this message in the networking platform