开发者

Unresolved lambda expression in Re#

I can't figure out what Re# is complaining about with a piece of code. Everything compiles ok and works as it should, but Re# can't seem to resolve the expression without offering any suggestions. Look at the attach开发者_开发问答ment for code and error.

Any offers?

Unresolved lambda expression in Re#


Your code is fine. This was a bug in Resharper, now fixed in version 5.1.

Had the same warning all over the place (to the extent I turned off Re# until I got the 5.1 update). Ours was also a Silverlight 4 app.

Re# 5.1 behaves a lot better with VS 2010 now. Clashes with intellisense autocomplete have also vanished.


I haven't used Resharper so I could be off the mark here, but Invoke accepts a Delegate or an Action; a lambda expression can be converted to either of those (as explained in this answer from Jon Skeet). Perhaps Resharper doesn't know which of those it should be cast to.

If you change it to

Dispatcher.BeginInvoke(new Action(() => // ...

the error will most likely go away.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜