private static bool CheckNewValue(ref int currentValue, int newValue, char patternChar, ref DateTimeResult result) {
if (currentValue == -1) {
currentValue = newValue;
return (true);
} else {
if (newValue != currentValue) {
result.SetFailure(ParseFailureKind.FormatWithParameter, "Format_RepeatDateTimePattern", patternChar);
return (false);
}
}
return (true);
}