GetOpt Class

GetOpt.HasArgument Method 

Returns true/false based on whether the given option has an argument or not.

public bool HasArgument(
   string option
);

Parameters

option
The option to check

Return Value

Whether the option has an argument

Exceptions

Exception TypeCondition
Exception Thrown when the given option is not defined

Example

            if (optionParser.IsDefined("bar") && optionParser.HasArgument("bar")) {
            	...
            }
            

See Also

GetOpt Class | GetOpt Members | Heyes Namespace