Click or drag to resize

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
)

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: Object
Converted value of the given data type which can be inside the API.

Implements

IRuntimeManagerConvertStringToValue(String, IDataType)
Examples
Adjust a Parameter.
C#
foreach (IParameter param in procedure.Parameters)
{
    object val = rt.ConvertStringToValue(literalString, param.DataType);
    (param as IInParameter).Value = val;
}
See Also