Click or drag to resize

YArgumentParser Constructor

Overload List
  Name Description
Public method Code example YArgumentParser(String) Create a new argument parser engine from an argument string.
Example
C#
YArgumentParser argumentParser = new YArgumentParser("\"First value of the main argument\" \"Second value of the main argument\" -s source /d destination -readonly");
In results, argumentParser will have 4 arguments :
  • the main argument which has 2 values
  • s argument which has source as value
  • d argument which has destination as value
  • readonly argument which is set as boolean
Public method Code example YArgumentParser(String) Create a new argument parser engine from an argument list.
Example
C#
YArgumentParser argumentParser = new YArgumentParser(new string[]
{ 
    "First value of the main argument",
    "Second value of the main argument",
    "-s",
    "source",
    "/d",
    "destination",
    "-readonly"
});
In results, argumentParser will have 4 arguments :
  • the main argument which has 2 values
  • s argument which has source as value
  • d argument which has destination as value
  • readonly argument which is set as boolean
Top
See Also