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
Another way to solve it is to not create the query object until after you have definitely assigned values to those variables.