Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AF SDK Reference

AFAnalysisService.RuntimeFieldValue.ToObject(T) Method

AFAnalysisService.RuntimeFieldValue.ToObject(T) Method

  • Last UpdatedNov 18, 2025
  • 2 minute read
AFAnalysisService.RuntimeFieldValue.ToObject(T) Method
Converts the value to an object of the specified type or throw exception on error.

Namespace:  OSIsoft.AF.Analysis
Assembly:  OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182

Syntax

public T ToObject<T>()
Public Function ToObject(Of T) As T

Dim instance As AFAnalysisServiceRuntimeFieldValue
Dim returnValue As T

returnValue = instance.ToObject()
public:
generic<typename T>
T ToObject()
member ToObject : unit -> 'T 

Type Parameters

T
The following types are supported: String, Int32, Int64, Double, AFTime, and Guid (for .NET 4 only).

Return Value

Type: T
Value converted to the specified type.

Exceptions

ExceptionCondition
InvalidOperationExceptionThrown when unsupported type T is specified.
ArgumentExceptionThrown when the value conversion to type T was unsuccessful.

Version Information

AFSDK

Supported in: 3.1.1, 3.1.0, 3.0.2, 3.0.1, 3.0.0, 2.10.11, 2.10.5

See Also

In This Topic
Related Links
TitleResults for “How to create a CRG?”Also Available in