Skip to content

M_CommandLine_Parser_ParseArguments__1

Moh.Hassan edited this page Oct 10, 2019 · 1 revision

Parser.ParseArguments(T) Method (IEnumerable(String))

Parses a string array of command line arguments constructing values in an instance of type T. Grammar rules are defined decorating public properties with appropriate attributes.

Namespace: CommandLine
Assembly: CommandLine (in CommandLine.dll) Version: 0.0.0

Syntax

C#

public ParserResult<T> ParseArguments<T>(
	IEnumerable<string> args
)

VB

Public Function ParseArguments(Of T) ( 
	args As IEnumerable(Of String)
) As ParserResult(Of T)

C++

public:
generic<typename T>
ParserResult<T>^ ParseArguments(
	IEnumerable<String^>^ args
)

F#

member ParseArguments : 
        args : IEnumerable<string> -> ParserResult<'T> 

Parameters

 

args
Type: System.Collections.Generic.IEnumerable(String)
A String array of command line arguments, normally supplied by application entry point.

Type Parameters

 

T
Type of the target instance built with parsed value.

Return Value

Type: ParserResult(T)
A ParserResult(T) containing an instance of type T with parsed values and a sequence of Error.

Exceptions

 

Exception Condition
ArgumentNullException Thrown if one or more arguments are null.

See Also

Reference

Parser Class
ParseArguments Overload
CommandLine Namespace

Clone this wiki locally