CmdLineOptionParser.IsArgumentOption Method

Definition

Gets the argument from a command-line option that accepts an argument, such as /r[eference]:<file list>.

Overloads

IsArgumentOption(String, String)

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

Gets the argument from the specified command-line option. Applies to options that have only one name, such as /out:<filename>.

IsArgumentOption(String, String, String)

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

Gets the argument from the specified command-line option. Applies to options that can be specified by a short or long form of the option name, such as /r or /reference for /r[eference]:<file list>.

IsArgumentOption(String, String)

Gets the argument from the specified command-line option. Applies to options that have only one name, such as /out:<filename>.

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

public:
 static System::String ^ IsArgumentOption(System::String ^ option, System::String ^ prefix);
public static string IsArgumentOption (string option, string prefix);
static member IsArgumentOption : string * string -> string
Public Shared Function IsArgumentOption (option As String, prefix As String) As String

Parameters

option
String

The command-line option that the user specified.

prefix
String

The option name.

Returns

The argument, "" if the argument is not specified, or null if the option or argument is not correctly formed.

Applies to

IsArgumentOption(String, String, String)

Gets the argument from the specified command-line option. Applies to options that can be specified by a short or long form of the option name, such as /r or /reference for /r[eference]:<file list>.

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

public:
 static System::String ^ IsArgumentOption(System::String ^ option, System::String ^ shortPrefix, System::String ^ longPrefix);
public static string IsArgumentOption (string option, string shortPrefix, string longPrefix);
static member IsArgumentOption : string * string * string -> string
Public Shared Function IsArgumentOption (option As String, shortPrefix As String, longPrefix As String) As String

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

The argument, "" if the argument is not specified, or null if the option or argument is not correctly formed.

Applies to