Dynamically invokes the method represented by the given delegate. The delegate can be null.
Declaring type: SafeDynamicInvoker
Namespace: Zyan.Communication.Delegates
Assembly: Zyan.Communication
Collapse/Expand Syntax
C#
public static object SafeDynamicInvoke (
        Delegate deleg,
        params object[] args
) 
Parameters
deleg
The delegate to invoke.
args
The arguments for the delegate.
Return Value
The return value of the delegate
Collapse/Expand Remarks
Ensures that all delegates of the invocation list are called (even if some exceptions occured). If several delegates throw exceptions, then the first exception is rethrown. In .NET 4.0, all exceptions are aggregated into one AggregateException.