 | 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
Syntaxpublic static Object StringToTypedValue(
string sourceString,
Type targetType
)
Public Shared Function StringToTypedValue (
sourceString As String,
targetType As Type
) As Object
public:
static Object^ StringToTypedValue(
String^ sourceString,
Type^ targetType
)
static member StringToTypedValue :
sourceString : string *
targetType : Type -> Object
Parameters
- sourceString
- Type: SystemString
The string to convert from
- targetType
- Type: SystemType
The type to convert to
Return Value
Type:
Objectobject. Throws exception if it cannot be converted.
See AlsoReference
Class ReflectionUtils