how to see if string has only letters c# code example
Example 1: c# check if string is only letters and numbers
if (textVar.All(c => Char.IsLetterOrDigit(c))) {
// String contains only letters & numbers
}
Example 2: how to check that string has only alphabet in c#
Regex.IsMatch(input, @"^[a-zA-Z0-9]+$");