check character in c# code example
Example 1: c# check if char is string
if (abc.ToLower().IndexOf('s') != -1) { }
Example 2: c# check characters in string
//true if it doesn't contain letters
bool result = hello.Any(x => !char.IsLetter(x));
if (abc.ToLower().IndexOf('s') != -1) { }
//true if it doesn't contain letters
bool result = hello.Any(x => !char.IsLetter(x));