if(){...}
else{...}
if ( query.Count > 0 ){...}
The displayed above is a skeleton similar to the one that I use. In the first if-then-else sequence I initialize a query variable (used in LINQ) called query and then check it at the next if -statement. Still the environment says that query is not presented in the current context. If the code from the if-then statement is used alone - then no problems are observed. It seems to me that the problem is with the initialization of the variable. Do you have any other suggestions?
If you have an idea how to initialize with null value a variable that is to be queried with link - I would be glad to hear this, too. Thank you!