View result of LINQ query in watch/debugger

前端 未结 4 1204
走了就别回头了
走了就别回头了 2021-01-04 07:07

Is there a way you can view the result of a LINQ query in Visual Studio 2010? If you add the query as a watch expression it will say \"Expression cannot contain lambda expre

4条回答
  •  醉话见心
    2021-01-04 07:40

    I'm not sure if this is what you mean (I may be misunderstanding) but I can see the results of my LINQ query by looking in the Locals window and expanding the Results view of my query variable. enter image description here

    Within that, I can expand ever further and see the data inside: enter image description here

提交回复
热议问题