Testing ASCII values of user input
byte[] _asciiAnswer = Encoding.ASCII.GetBytes(AnswerTb.Text.Trim());
IEnumerator _asciiChars = _asciiAnswer.GetEnumerator();
while (_asciiChars.MoveNext())
{
byte _char = (byte)_asciiChars.Current;
if (_char >= 65 && _char <= 90)
IsUpperCase = true;
}
No comments:
Post a Comment