开发者

Can't use Lambda expressions in Windows services?

I've developed a server software for .net 3.5 which I tried to convert to a windows service application. So I created a new Windows service project and added all my classes. But I can't compile it because it doesn't understand the lambda expressions i've used. I've checked so that all references are imported. But it seems like it isn't possible开发者_JAVA技巧 to change the target framework in a windows service project and I suspect that it's the problem.


If you try to use the LINQ extension methods but you don't import System.Linq it won't compile. Try:

using System.Linq;


Check your references. Sounds like you are missing a required type. If you post the entire compiler error and maybe some sample code we could probably provide more insight.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜