I guess it should be like this:
bool result1 = Regex.IsMatch("ABCDEF", @"^[A-Z]{2}$");
bool result2 = Regex.IsMatch("ABCDEF", @"^[A-Z]{2,2}$");
bool result3 = Regex.IsMatch("AB", @"^[A-Z]{,2}$");
bool result4 = Regex.IsMatch("AB", @"^[A-Z]{2,2}$");
If a caret (^) is at the beginning of the entire regular expression, it matches the beginning of a line.
If a dollar sign ($) is at the end of the entire regular expression, it matches the end of a line.