Visual Basic (Usage) | ![]() |
---|---|
Dim context As ISystemContext Dim targetType As Type Dim extension As ExtensionObject Dim throwOnError As Boolean Dim value As Object value = BaseVariableState.DecodeExtensionObject(context, targetType, extension, throwOnError) |
C# | |
---|---|
public static object DecodeExtensionObject( ISystemContext context, Type targetType, ExtensionObject extension, bool throwOnError ) |
Parameters
- context
- The context (uses ServiceMessageContext.GlobalContext if null).
- targetType
- The type that the ExtensionObject must be converted to.
- extension
- The ExtensionObject to convert.
- throwOnError
- Whether to throw an exception on error.
Return Value
The decoded instance. Null on error.Target Platforms: Windows 7/8/10, Windows Server 2003/2008/2012/2015, .NET4.x