linq with unassigned variable parameters

前端 未结 3 977
孤独总比滥情好
孤独总比滥情好 2021-01-15 03:10

I have the following variable declarations at the top of my main function

string brand;
double price;
var itemList6 = from i in myStore.items
    where i.pri         


        
3条回答
  •  囚心锁ツ
    2021-01-15 04:13

    Another way to solve it is to not create the query object until after you have definitely assigned values to those variables.

提交回复
热议问题