Click or drag to resize
Ranorex

ValueConverterFromString Method (String, Type)

Creates an instance of the specified type from string data.

Namespace:  Ranorex.Core
Assembly:  Ranorex.Core (in Ranorex.Core.dll) Version: 12.7.4-git.38314c06
Syntax
public static Object FromString(
	string value,
	Type targetType
)

Parameters

value
Type: SystemString
The string data representation of the type.
targetType
Type: SystemType
The target type to convert to.

Return Value

Type: Object
The object instance.
Exceptions
ExceptionCondition
ArgumentNullExceptionIf value is null and targetType is a value type or targetType is null.
ExceptionIf the value cannot be converted to the specified targetType.
FormatExceptionIf the value cannot be parsed and converted to the specified targetType.
See Also