public void Validate() { Regex regex = new Regex(PATTERN); if (!regex.Match(ToString()).Success) throw new Exception(string.Format("Invalid Resolution - {0}", ToString())); }