Access the value of a member expression

前端 未结 9 2089
滥情空心
滥情空心 2020-12-04 08:33

If i have a product.

var p = new Product { Price = 30 };

and i have the following linq query.

var q = repo.Products().Where         


        
9条回答
  •  悲哀的现实
    2020-12-04 09:17

    And what exactly are you trying to accomplish?

    Because to access the value of Price, you'd have to do something like:

    var valueOfPrice = q[0].Price;
    

提交回复
热议问题