ArgumentExtensions.Parse 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
Parse(Argument, String) |
使用自變數剖析命令行字串值。 |
Parse(Argument, String[]) |
使用自變數剖析命令行字串值。 |
Parse(Argument, String)
使用自變數剖析命令行字串值。
public:
[System::Runtime::CompilerServices::Extension]
static System::CommandLine::Parsing::ParseResult ^ Parse(System::CommandLine::Argument ^ argument, System::String ^ commandLine);
public static System.CommandLine.Parsing.ParseResult Parse (this System.CommandLine.Argument argument, string commandLine);
static member Parse : System.CommandLine.Argument * string -> System.CommandLine.Parsing.ParseResult
<Extension()>
Public Function Parse (argument As Argument, commandLine As String) As ParseResult
參數
- argument
- Argument
用來剖析命令行輸入的自變數。
- commandLine
- String
要剖析的命令行字串,可包含空格和引號,相當於可輸入至終端機的內容。
傳回
描述剖析作業結果的剖析結果。
備註
命令行字串輸入會分割成令牌,就像已在命令行上傳遞一樣。
適用於
Parse(Argument, String[])
使用自變數剖析命令行字串值。
public:
[System::Runtime::CompilerServices::Extension]
static System::CommandLine::Parsing::ParseResult ^ Parse(System::CommandLine::Argument ^ argument, cli::array <System::String ^> ^ args);
public static System.CommandLine.Parsing.ParseResult Parse (this System.CommandLine.Argument argument, string[] args);
static member Parse : System.CommandLine.Argument * string[] -> System.CommandLine.Parsing.ParseResult
<Extension()>
Public Function Parse (argument As Argument, args As String()) As ParseResult
參數
- argument
- Argument
用來剖析命令行輸入的自變數。
- args
- String[]
要剖析的字串自變數。
傳回
描述剖析作業結果的剖析結果。