What you can probably do is define a regex of allowed characters (or non-allowed characters, depending on your requirement), then check the string against it as shown below
Regex myCheck = new Regex("^[a-zA-Z0-9]*$");
if (myCheck.IsMatch(myString))
{
HandleNonAllowedcharacter();
}
Hope that helps
-Milind