/// <summary> /// Creates a new IntegerOption and adds it to the list of accepted options. /// </summary> /// <param name="shortForm">The optional short form for the option.</param> /// <param name="longForm">The long form for the option.</param> /// <returns>The newly created Option.</returns> /// <exception cref="System.ArgumentNullException">The long form is null.</exception> public IntegerOption AddIntegerOption(string shortForm, string longForm) { if (null == longForm) { throw new ArgumentNullException("longForm", "The long form is not optional."); } IntegerOption option = new IntegerOption(shortForm, longForm); AddOption((Option)option); return(option); }
/// <summary> /// Creates a new IntegerOption and adds it to the list of accepted options. /// </summary> /// <param name="shortForm">The optional short form for the option.</param> /// <param name="longForm">The long form for the option.</param> /// <returns>The newly created Option.</returns> /// <exception cref="System.ArgumentNullException">The long form is null.</exception> public IntegerOption AddIntegerOption( string shortForm, string longForm ) { if(null == longForm) throw new ArgumentNullException("longForm", "The long form is not optional."); IntegerOption option = new IntegerOption(shortForm, longForm); AddOption((Option)option); return option; }