CmdLineOptionParser.IsBooleanOption Method

Definition

Gets the argument from a command-line option that accepts a + or - switch argument, such as /debug[+|-].

Overloads

IsBooleanOption(String, String)

This API supports the product infrastructure and is not intended to be used directly from your code.

Gets the + or - argument from the specified command-line option. Applies to options that have only one name, such as /debug[+|-].

IsBooleanOption(String, String, String)

This API supports the product infrastructure and is not intended to be used directly from your code.

Gets the + or - argument from the specified command-line option. Applies to options that can be specified by a short or long form of the option name.

IsBooleanOption(String, String)

Gets the + or - argument from the specified command-line option. Applies to options that have only one name, such as /debug[+|-].

This API supports the product infrastructure and is not intended to be used directly from your code.

public static object IsBooleanOption (string option, string prefix);

Parameters

option
String

The command-line option that the user specified.

prefix
String

The option name.

Returns

false for -; true for + or if the argument is not specified; null if the option or argument is not correctly formed.

Applies to

.NET Framework 4.8.1 og andre versioner
Produkt Versions
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

IsBooleanOption(String, String, String)

Gets the + or - argument from the specified command-line option. Applies to options that can be specified by a short or long form of the option name.

This API supports the product infrastructure and is not intended to be used directly from your code.

public static object IsBooleanOption (string option, string shortPrefix, string longPrefix);

Parameters

option
String

The command-line option that the user specified.

shortPrefix
String

The short form of the option name.

longPrefix
String

The long form of the option name.

Returns

false for -; true for + or if the argument is not specified; null if the option or argument is not correctly formed.

Applies to

.NET Framework 4.8.1 og andre versioner
Produkt Versions
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1