Sprog

Option Constructors

Definition

Overloads

Name Description
Option(String, String)
Option(String, String[])

Initializes a new instance of the Option class.

Option(String[], String)

Option(String, String)

public Option(string alias, string description = default);
new System.CommandLine.Option : string * string -> System.CommandLine.Option
Public Sub New (alias As String, Optional description As String = Nothing)

Parameters

alias
String
description
String

Applies to

Option(String, String[])

Source:
Option.cs
Source:
Option.cs

Initializes a new instance of the Option class.

protected:
 Option(System::String ^ name, cli::array <System::String ^> ^ aliases);
protected Option(string name, string[] aliases);
new System.CommandLine.Option : string * string[] -> System.CommandLine.Option
Protected Sub New (name As String, aliases As String())

Parameters

name
String

The name of the option. This is used during parsing and is displayed in help.

aliases
String[]

Optional aliases by which the option can be specified on the command line.

Applies to

Option(String[], String)

public Option(string[] aliases, string description = default);
new System.CommandLine.Option : string[] * string -> System.CommandLine.Option
Public Sub New (aliases As String(), Optional description As String = Nothing)

Parameters

aliases
String[]
description
String

Applies to