private static void CheckCode(int code) { if ((code < 0) || (code > 999)) { throw new ArgumentOutOfRangeException(nameof(code)); } }