private bool ValidateNumbers() { if (textBox2.Text == string.Empty) { return true; } char[] testArr = textBox2.Text.ToArray(); bool stat = false; for (int i = 0; i < testArr.Length; i++) { if (!char.IsNumber(testArr[i])) { stat = true; } } return stat; }
"^[a-zA-Z0-9]*$"
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)