c# check if text is only numbers and 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
}