Skip to content

Reference

ExtensionObjectExtensions Members

Provides extension methods for the ExtensionObject class.

Reference

ExtensionObjectExtensions Members ​

Type
ExtensionObjectExtensions
Namespace
Opc.UaFx
Assembly
Opc.UaFx.Advanced.dll
Package
Opc.UaFx.Advanced v2.59.0
Also in
Opc.UaFx.Client

Methods ​

To ​

static

Retrieves the body of the extensionObject as an instance of T.

csharp
public static T To<T>(this ExtensionObject extensionObject)
vbnet
Public Shared Function [To](Of T)(extensionObject As ExtensionObject) As T

Type parameters

NameDescription
TThe type of the instance stored in the body.

Parameters

NameTypeDescription
extensionObjectExtensionObjectThe ExtensionObject whose body is to be retrieved.

Returns

T

The instance of T stored in the body of the extensionObject.

Exceptions

ExceptionCondition
InvalidCastExceptionThe body of the extensionObject is not an instance of T.

Remarks

If the body holds an instance of T decoded by the SDK, the decoded instance is returned instead of the body itself.