Returns the supplied options argument. Throws an exception if option does not have one.
The options argument
| Exception Type | Condition |
|---|---|
| Exception | Thrown when the supplied option does not have an argument |
if (optionParser.IsDefined("bar") && optionParser.HasArgument("bar")) {
string optionArg = optionParser.GetOptionArg("bar");
}