public static void checkValidRandomVariableName(String name)
{
if (null == name || name.Trim().Length == 0
|| name.Trim().Length != name.Length || name.Contains(" "))
{
throw new ArgumentException(
"Name of RandomVariable must be specified and contain no leading, trailing or embedded spaces.");
}
if (name.Substring(0, 1).ToLower().Equals(name.Substring(0, 1)))
{
throw new ArgumentException(
"Name must start with a leading upper case letter.");
}
}