public bool HelpRequested { get; set; }
Public Property HelpRequested As Boolean
Get
Set
Dim instance As CommandLineParser
Dim value As Boolean
value = instance.HelpRequested
instance.HelpRequested = value
public:
property bool HelpRequested {
bool get ();
void set (bool value);
}
Check this property after calling the Parse(String[], Int32) method to see if usage help should be displayed.
This property will be true if the Parse(String[], Int32) method threw a CommandLineArgumentException, if an argument used CancelParsing, if parsing was canceled using the ArgumentParsed event.
If an argument that is defined by a method (Method) cancels parsing by returning false from the method, this property is not automatically set to true. Instead, the method should explicitly set the HelpRequested property if it wants usage help to be displayed.
[CommandLineArgument]
public static bool MethodArgument(CommandLineParser parser)
{
parser.HelpRequested = true;
return false;
}
The HelpRequested property will always be false if Parse(String[], Int32) did not throw and returned a non-null value.