ParseResultExtensions.HasOption(ParseResult, Option) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
Tee yhteistyötä kanssamme GitHubissa
Tämän sisällön lähde on GitHubissa, jossa voit myös luoda ja tarkastella ongelmia ja pull-pyyntöjä. Katso lisätietoja osallistujan oppaasta.