private HowManyBeforeExceedingMaxOccurs ( int howMany ) : int | ||
howMany | int | |
return | int |
private int HowManyBeforeExceedingMaxOccurs(int howMany)
{
if (MaxOccurs > 0 && (Occurs + howMany) > MaxOccurs)
{
Console.Error.WriteLine("Option " + LongForm + " can be used at most " + MaxOccurs + " times. Ignoring extras...");
howMany = MaxOccurs - Occurs;
}
Occurs += howMany;
return howMany;
}