YArgumentParserArgumentIsSetT(T) Method
|
Check if the
argName is set as a boolean.
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 false because the main argument cannot be set as boolean
- argumentParser.ArgumentIsSet(ArumentsTypes.s) will return false because this argument is not set as boolean
- argumentParser.ArgumentIsSet(ArumentsTypes.readonly) will return true
- argumentParser.ArgumentIsSet(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 ArgumentIsSet<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