EnumConverterConvert(String, CultureInfo, CommandLineArgument) Method

Converts a string to the enumeration type.

Definition

Namespace: Ookii.CommandLine.Conversion
Assembly: Ookii.CommandLine (in Ookii.CommandLine.dll) Version: 4.0.0+bb7ed9a8fdfd1cb21824750a8cf508863ad15086
C#
public override Object? Convert(
	string value,
	CultureInfo culture,
	CommandLineArgument argument
)

Parameters

value  String
The string to convert.
culture  CultureInfo
The culture to use for the conversion.
argument  CommandLineArgument
The CommandLineArgument that will use the converted value.

Return Value

Object
An object representing the converted value.

Remarks

This method performs the conversion using the EnumParse(Type, String, Boolean) method.

Exceptions

CommandLineArgumentException The value was not valid for the enumeration type.

See Also