YArgumentParserHasArgumentT(T) Method
|
Check if the enum value
argName is set.
Example enum ArumentsTypes
{
main = 0,
s,
m,
readonly,
}
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.ArgumentIsSet(ArumentsTypes.main) will return true
- argumentParser.HasArgument(ArumentsTypes.s) will return true
- argumentParser.HasArgument(ArumentsTypes.readonly) will return true
- argumentParser.HasArgument(ArumentsTypes.m) will return false
Namespace: Upsilon.Common.LibraryAssembly: Upsilon.Common.Library (in Upsilon.Common.Library.dll) Version: 2.2.2+14985a67b419f90e14e6b1bde61d18cf6cf12b27
Syntax public bool HasArgument<T>(
T argName
)
where T : Enum
Parameters
- argName T
- The argument name as enum value. Note that the enum '0' value means to the main argument.
Type Parameters
- T
Return Value
BooleanReturns
true or
falseSee Also