 | ValueConverterTryFromString Method (String, Type, Object) |
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
Syntaxpublic static bool TryFromString(
string value,
Type targetType,
out Object result
)
Public Shared Function TryFromString (
value As String,
targetType As Type,
<OutAttribute> ByRef result As Object
) As Boolean
Parameters
- value
- Type: SystemString
The string data representation of the type. - targetType
- Type: SystemType
The target type to convert to. - result
- Type: SystemObject
When this method returns, contains the converted object instance.
Return Value
Type:
BooleanIf
true the
value can be converted to
the specified
targetType.
Exceptions| Exception | Condition |
|---|
| ArgumentNullException | If value is null and
targetType is a value type or targetType is
null. |
See Also