ParseOptionsUseErrorColor Property

Gets or sets a value that indicates whether error messages should use color.

Definition

Namespace: Ookii.CommandLine
Assembly: Ookii.CommandLine (in Ookii.CommandLine.dll) Version: 4.2.0+a4d3631e4dcc0970081ed435288efdebc1325f83
C#
public bool? UseErrorColor { get; set; }

Property Value

NullableBoolean
to enable color output; to disable color output; or to enable it if the error output supports it.

Remarks

Only the parsing methods that automatically handle errors will use this property.

If this property is and the Error property is , color will be used if the standard error stream supports it, as determined by the VirtualTerminalEnableColor(StandardStream) method.

If this property is set to explicitly, virtual terminal sequences may be included in the output even if it's not supported, which may lead to garbage characters appearing in the output.

See Also