| RuntimeManagerConvertStringToValue Method (String, IDataType) |
Converts a string representation to value of the given dataType independent from the given target system.
Namespace:
OpenTestSystem.Otx.Runtime.Api
Assembly:
OpenTestSystem.Otx.Runtime.Api (in OpenTestSystem.Otx.Runtime.Api.dll) Version: 5.5.0.0 (6.1.0.31040)
Syntax public Object ConvertStringToValue(
string literalString,
IDataType dataType
)
Public Function ConvertStringToValue (
literalString As String,
dataType As IDataType
) As Object
public:
virtual Object^ ConvertStringToValue(
String^ literalString,
IDataType^ dataType
) sealed
Parameters
- literalString
- Type: SystemString
The string which will be converted to the given DataType. - dataType
- Type: OpenTestSystem.Otx.Runtime.Api.OtxIDataType
The given DataType.
Return Value
Type:
ObjectConverted value of the given data type which can be inside the API.
Implements
IRuntimeManagerConvertStringToValue(String, IDataType)Examples
Adjust a Parameter.
foreach (IParameter param in procedure.Parameters)
{
object val = rt.ConvertStringToValue(literalString, param.DataType);
(param as IInParameter).Value = val;
}
See Also