CommandLineParserNameValueSeparator Property
Gets or sets the character used to separate the name and the value of an argument.
Namespace: Ookii.CommandLineAssembly: Ookii.CommandLine (in Ookii.CommandLine.dll) Version: 3.1.1
public char NameValueSeparator { get; }
Public ReadOnly Property NameValueSeparator As Char
Get
Dim instance As CommandLineParser
Dim value As Char
value = instance.NameValueSeparator
public:
property wchar_t NameValueSeparator {
wchar_t get ();
}
Property Value
Char
The character used to separate the name and the value of an argument. The default value is the
DefaultNameValueSeparator constant, a colon (:).
This character is used to separate the name and the value if both are provided as
a single argument to the application, e.g. -sample:value if the default value is used.
The character chosen here cannot be used in the name of any parameter. Therefore,
it's usually best to choose a non-alphanumeric value such as the colon or equals sign.
The character can appear in argument values (e.g. -sample:foo:bar is fine, in which
case the value is "foo:bar").
Do not pick a whitespace character as the separator. Doing this only works if the
whitespace character is part of the argument token, which usually means it needs to be
quoted or escaped when invoking your application. Instead, use the
AllowWhiteSpaceValueSeparator property to control whether whitespace
is allowed as a separator.
Use the ParseOptions or ParseOptionsAttribute class to
change this value.