ParseOptionsAttributeNameValueSeparators Property
Gets or sets the characters used to separate the name and the value of an argument.
Namespace: Ookii.CommandLineAssembly: Ookii.CommandLine (in Ookii.CommandLine.dll) Version: 4.0.0+bb7ed9a8fdfd1cb21824750a8cf508863ad15086
public char[]? NameValueSeparators { get; set; }
Public Property NameValueSeparators As Char()
Get
Set
Dim instance As ParseOptionsAttribute
Dim value As Char()
value = instance.NameValueSeparators
instance.NameValueSeparators = value
public:
property array<wchar_t>^ NameValueSeparators {
array<wchar_t>^ get ();
void set (array<wchar_t>^ value);
}
Property Value
Char
The characters used to separate the name and the value of an argument, or
to use the default value from the
CommandLineParserGetDefaultNameValueSeparators
method, which is a colon ':' and an equals sign '='. The default value is
.
These characters are used to separate the name and the value if both are provided as
a single argument to the application, e.g. -sample:value or -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 white-space character as the separator. Doing this only works if the
whitespace character is part of the argument, which usually means it needs to be
quoted or escaped when invoking your application. Instead, use the
AllowWhiteSpaceValueSeparator property to control whether white space
is allowed as a separator.
This value can be overridden by the ParseOptionsNameValueSeparators
property.