check if user is entering only alphbets and space c# code example
Example: c# check if string is only letters and numbers
if (textVar.All(c => Char.IsLetterOrDigit(c))) {
// String contains only letters & numbers
}
if (textVar.All(c => Char.IsLetterOrDigit(c))) {
// String contains only letters & numbers
}