标签:linq-to-objects
-
您可以在选择项目之前在linq查询中设置属性吗? - c#
时间:2020-7-14有什么方法可以在查询中间设置属性? var products = from p in Products let pricecalc = p.IsDiscontinued ? 0 : p.UnitPrice // somehow set p.Price = pricecalc select p; 我知道我可以使用select new Product { .. […]