DynamicValueTryInvoke Method

Provides the implementation for operations that invoke an object. Classes derived from the DynamicObject class can override this method to specify dynamic behavior for operations such as invoking an object or a delegate.


Namespace: TwinCAT.TypeSystem
Assembly: TwinCAT.Ads (in TwinCAT.Ads.dll) Version: 7.0.0+e56d35ccc4675faac24789a4aab60071fc61d470

Syntax

C#

public override bool TryInvoke(
    InvokeBinder binder,
    Object?[]? args,
    out Object?? result
)

Parameters

binder  InvokeBinder

Provides information about the invoke operation.

args  Object

The arguments that are passed to the object during the invoke operation. For example, for the sampleObject(100) operation, where sampleObject is derived from the DynamicObject class, args is equal to 100.

result  Object

The result of the object invocation.

Return Value

Boolean
true if the operation is successful; otherwise, false. If this method returns false, the run-time binder of the language determines the behavior. (In most cases, a language-specific run-time exception is thrown.

Reference

DynamicValue Class TwinCAT.TypeSystem Namespace

Beckhoff Automation GmbH & Co. KG 2001-2026