c# check if string only contains letters 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
}