Option<T> Constructors
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.
Overloads
| Name | Description |
|---|---|
| Option<T>(String, String) | |
| Option<T>(String, String[]) |
Initializes a new instance of the Option class. |
| Option<T>(String[], String) |
Option<T>(String, String)
- Source:
- Option{T}.cs
public Option(string alias, string description = default);
new System.CommandLine.Option<'T> : string * string -> System.CommandLine.Option<'T>
Public Sub New (alias As String, Optional description As String = Nothing)
Parameters
- alias
- String
- description
- String
Applies to
Option<T>(String, String[])
- Source:
- Option{T}.cs
- Source:
- Option{T}.cs
Initializes a new instance of the Option class.
public:
Option(System::String ^ name, ... cli::array <System::String ^> ^ aliases);
public Option(string name, params string[] aliases);
new System.CommandLine.Option<'T> : string * string[] -> System.CommandLine.Option<'T>
Public Sub New (name As String, ParamArray 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<T>(String[], String)
- Source:
- Option{T}.cs
public Option(string[] aliases, string description = default);
new System.CommandLine.Option<'T> : string[] * string -> System.CommandLine.Option<'T>
Public Sub New (aliases As String(), Optional description As String = Nothing)
Parameters
- aliases
- String[]
- description
- String