Click or drag to resize

YArgumentParserHasArgument(String) Method

Check if the argName is set.
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.HasArgument(string.Empty) will return true because it has main argument
  • argumentParser.HasArgument("s") will return true
  • argumentParser.HasArgument("readonly") will return true
  • argumentParser.HasArgument("m") will return false

Namespace: Upsilon.Common.Library
Assembly: Upsilon.Common.Library (in Upsilon.Common.Library.dll) Version: 2.2.2+14985a67b419f90e14e6b1bde61d18cf6cf12b27
Syntax
C#
public bool HasArgument(
	string argName
)

Parameters

argName  String
The argument name.

Return Value

Boolean
Returns true or false
See Also