Click or drag to resize

WriteUsageOptionsOptionalArgumentFormat Property

Gets or sets the format string to use for optional arguments and optional argument names.

Namespace:  Ookii.CommandLine
Assembly:  Ookii.CommandLine (in Ookii.CommandLine.dll) Version: 2.3.0
Syntax
public string OptionalArgumentFormat { get; set; }

Property Value

Type: String
The format string to use for optional arguments; the default value is "[{0}]".
Remarks

This format string is used for optional parameters in the command line syntax. For example, using the default value, an optional parameter would be formatted as "[-sample <String>]". The format string is also used for positional arguments, in which case the argument name is optional. For example, an optional positional argument would be formatted as "[[-sample] <String>]" using the default value.

This format string should have one placeholder, which is used for the entire argument or the argument name.

Setting this property to will revert it to its default value.

See Also