Click or drag to resize

CommandLineArgumentConvertToArgumentType Method

Converts the specified string to the argument type, as specified in the ArgumentType property.

Namespace:  Ookii.CommandLine
Assembly:  Ookii.CommandLine (in Ookii.CommandLine.dll) Version: 2.3.0
Syntax
public Object ConvertToArgumentType(
	CultureInfo culture,
	string argument
)

Parameters

culture
Type: System.GlobalizationCultureInfo
The culture to use to convert the argument.
argument
Type: SystemString
The string to convert.

Return Value

Type: Object
The argument, converted to the type specified by the ArgumentType property.
Exceptions
ExceptionCondition
ArgumentNullExceptionculture is
CommandLineArgumentExceptionargument could not be converted to the type specified in the ArgumentType property.
Remarks

The TypeConverter for the type specified by ArgumentType is used to do the conversion.

See Also