Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ASCII Value of a character
Message
 
To
13/09/2005 19:07:57
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Miscellaneous
Thread ID:
01049249
Message ID:
01049481
Views:
13
Not sure why this doesn't work. ascVal contains the character
from the substring.

Here's my code:
for(int iChar = 1; iChar < sTime.Length; iChar++)
{
  sChar = sTime.Substring(iChar - 1, 1);

  byte ascVal = System.Convert.ToByte(sChar);

  // Allowable values are 0-9,';','A','M','P'
  if ((iValue >= 48 && iValue <= 57) ||
    iValue == 58 ||
    iValue == 59 ||
    iValue == 77 ||
    iValue == 80)
  {
  }
  else
    bValid = false;

}
>>I am extracting characters from a string.
>>
>>How can I determine the ASCII value of the characters?
>>
>>Thanks
>
>byte ascVal = System.Convert.ToByte(char);
>
>Cetin
Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform