Click or drag to resize

ReflectionUtilsStringToTypedValue Method (String, Type)

Turns a string into a typed value generically. Explicitly assigns common types and falls back on using type converters for unhandled types. Common uses: * UI -> to data conversions * Parsers

Namespace:  Koden.Utils
Assembly:  Koden.Utils (in Koden.Utils.dll) Version: 1.1.6453.26060
Syntax
public static Object StringToTypedValue(
	string sourceString,
	Type targetType
)

Parameters

sourceString
Type: SystemString
The string to convert from
targetType
Type: SystemType
The type to convert to

Return Value

Type: Object
object. Throws exception if it cannot be converted.
See Also