Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

How to call Dispatcher.Invoke without detailed parameters signs to define a delegate?

$
0
0

Hi,

I got a function like:

internal static object AttemptMethod(object instance, Type type, MethodInfo methodinfo, object[] args)
        {
            return methodinfo.Invoke(instance, args);
        }

calling a method of instance without the exact parameters sign only given the paramter list args, looking good. Now I'm trying to multiply-threading it, doing like:

internal static object AttemptMethodMT(object instance, Type type, MethodInfo methodinfo, object[] args)
        {
            return Dispatcher.CurrentDispatcher.Invoke(?????, instance, args);
        }
But, without the exact paramters sign, how can I create a sound delegate for Dispatcher.CurrentDispatcher.Invoke? How can I create the delegate without exact parameter sign?

Thanks a lot.


Viewing all articles
Browse latest Browse all 18858

Trending Articles