Silverlight System.Windows.Threading Dispatcher.BeginInvoke() requires an Action<T> or delegate to call.
.NET allows me to pass only a lambda expression. but ReSharper sees this as an error, saying "It is impossible to resolve the BeginInvoke (lambda expression)" method: Dispatcher.BeginInvoke(() => { DoSomething(); })
The error disappears if I explicitly create an Action around an expression like this: Dispatcher.BeginInvoke(new Action<object>(o => { DoSomething(); }));
I prefer the least amount of code in this case for better readability. Is there a way to disable this ReSharper error notification? I tried some of the options, but could not find it.
Thanks Carl
source share