有些人使用我的应用程序似乎正在
System.MissingMethodException: Method not found: 'System.Object System.Windows.Threading.Dispatcher.Invoke (System.Delegate, System.Object[])'
有谁知道在这个版本的框架中添加了这个重载,是否可以安全使用?(未标记为已弃用)。
答案 0 :(得分:6)
以下方法在3.5 SP1上添加到Dispatcher类
BeginInvoke(Delegate, array[]()[]), BeginInvoke(Delegate, DispatcherPriority, array[]()[]), Invoke(Delegate, array[]()[]), Invoke(Delegate, TimeSpan, array[]()[]), Invoke(Delegate, TimeSpan, DispatcherPriority, array[]()[]), Invoke(Delegate, DispatcherPriority, array[]()[])
请查看以下链接:MSDN-Dispatcher-Class
答案 1 :(得分:0)
得到它......太烦人了。
只需使用:
Dispatcher.Invoke(DispatcherPriority.Normal, ...[REST OF PARAMS]);
此过载不会出现在IntelliSense中,但它可以完美地编译并适用于3.5和3.5SP1
PROFIT !!