語言

Argument<T> 建構函式

定義

多載

Argument<T>()

來源:
Argument{T}.cs
public:
 Argument();
public Argument();
Public Sub New ()

適用於

Argument<T>(TryConvertArgument<T>)

public:
 Argument(System::CommandLine::TryConvertArgument<T> ^ convert);
public Argument(System.CommandLine.TryConvertArgument<T> convert);
new System.CommandLine.Argument<'T> : System.CommandLine.TryConvertArgument<'T> -> System.CommandLine.Argument<'T>
Public Sub New (convert As TryConvertArgument(Of T))

參數

適用於

Argument<T>(Func<T>)

來源:
Argument{T}.cs
public:
 Argument(Func<T> ^ defaultValue);
public Argument(Func<T> defaultValue);
new System.CommandLine.Argument<'T> : Func<'T> -> System.CommandLine.Argument<'T>
Public Sub New (defaultValue As Func(Of T))

參數

defaultValue
Func<T>

適用於

Argument<T>(String)

來源:
Argument{T}.cs
來源:
Argument{T}.cs

初始化 Argument 類別的新實例。

public:
 Argument(System::String ^ name);
public Argument(string name);
new System.CommandLine.Argument<'T> : string -> System.CommandLine.Argument<'T>
Public Sub New (name As String)

參數

name
String

自變數的名稱。 這個名稱可以用來查詢解析後的值,並在說明中顯示。

適用於

Argument<T>(String, T)

public:
 Argument(System::String ^ name, T defaultValue);
public Argument(string name, T defaultValue);
new System.CommandLine.Argument<'T> : string * 'T -> System.CommandLine.Argument<'T>
Public Sub New (name As String, defaultValue As T)

參數

name
String
defaultValue
T

適用於