Returns true of the string only contains upper case characters.
using System.Text.RegularExpressions;
...
static bool AllCapitals(string inputString)
{
return Regex.IsMatch(inputString, @"^[A-Z]+$");
}
blog comments powered by Disqus