Well, there is another way you can do it with looping through every
character. For example:
[code=csharp]private bool isNum(string str)
{
char[] chr = str.ToCharArray();
foreach (char dummy in chr)
if (!char.IsDigit(dummy)) return false;
return true;
}[/code]Is another way to check to see if its numeric, while
[code=csharp]private bool isChar(string str)
{
char[] chr = str.ToCharArray();
foreach (char dummy in chr)
if (!char.IsLetter(dummy)) return false;
return true;
}[/code]is a way to test to see if its letters only. Just change the IsLetter
function to one of the other checks (they are listed in MSDN and the
intellisense).