Breyta

Deila með


ParseResultExtensions.HasOption(ParseResult, Option) Method

Definition

Indicates whether a given option is present in the parse result.

public:
[System::Runtime::CompilerServices::Extension]
 static bool HasOption(System::CommandLine::Parsing::ParseResult ^ parseResult, System::CommandLine::Option ^ option);
public static bool HasOption (this System.CommandLine.Parsing.ParseResult parseResult, System.CommandLine.Option option);
static member HasOption : System.CommandLine.Parsing.ParseResult * System.CommandLine.Option -> bool
<Extension()>
Public Function HasOption (parseResult As ParseResult, option As Option) As Boolean

Parameters

parseResult
ParseResult

The parse result to check for the presence of the option.

option
Option

The option to check for the presence of.

Returns

true if the option is present; otherwise, false.

Remarks

If the option has a default value defined, then true will be returned.

Applies to