GetOpt Class

GetOpt.GetOptionArg Method 

Returns the supplied options argument. Throws an exception if option does not have one.

public string GetOptionArg(
   string option
);

Parameters

option
The option you want the argument for

Return Value

The options argument

Exceptions

Exception TypeCondition
Exception Thrown when the supplied option does not have an argument

Example

            if (optionParser.IsDefined("bar") && optionParser.HasArgument("bar")) {
            	string optionArg = optionParser.GetOptionArg("bar");
            }
            

See Also

GetOpt Class | GetOpt Members | Heyes Namespace