Click or drag to resize

RuntimeManagerConvertStringToValue Method (String, String)

Note: This API is now obsolete.

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
[ObsoleteAttribute("ConvertStringToValue(string literalString, string dataType) method is deprecated, please use ConvertStringToValue(string literalString, IDataType dataType) instead.")]
public Object ConvertStringToValue(
	string literalString,
	string dataType
)

Parameters

literalString
Type: SystemString
The string which will be converted to the given DataType.
dataType
Type: SystemString
The given DataType.

Return Value

Type: Object
Converted value of the given data type which can be inside the API.

Implements

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