how to find out ascii values in asp.net?
i want to know how to find out the ascii values in asp .net using c#
Status:
Open Dec 23, 2008 - 06:37 PM
asp.net
4answers
Answers
Mar 10, 2009 - 03:09 AM
Do u want to find a ascii value of a single character or a string?
Here is a simple example of converting a string to ascii values
I output the single character in the string on the console.
The combined ascii values is shown via a message box
String sSource = "priya";// Specify source string
String sResult = "";// Save result here
// Iterate thru each individual character
foreach (char c in sSource)
{
Console.WriteLine((byte)c);// Dump that ascii value to the console
sResult = sResult + (byte)c;
}
MessageBox.Show (sResult);// Show combined ascii values to user
Mar 20, 2009 - 04:22 AM
Thankyou Nidhi.can u tell me how to findout ascii value for a single character?
Mar 20, 2009 - 05:18 AM
If u want to check a character you could try this
int i;
char letter;
letter='A';
i = (int)letter;
Apr 11, 2009 - 07:48 AM
The question looks to be abandoned by the user who asked it. If no action is taken within 2 days, a Quomon Moderator will consider closing the question and distributing the points.
The Quomon Team
Answer this question
Share Your Own Experience & Expertise
We look to ensure that every question is answered by the best people with relevant expertise and experience, the best answers include multiple perspectives. Do you have relevant expertise or experience to contribute your answer to any of these commonly asked questions?
Add New Comment