I have a noob question. When I use the built in visual studio "if" snippet the expression in the parentheses won't initially recognize any of the variables in my class. I have tried google without much luck.
Here are my steps to reproduce:
- I type "if" - the if statement snippet appears in my intellisense.
- I hit enter or tab - the if statement is added. There is now a red box inside the parentheses that says "expr".
- I now attempt to start typing my variable - nothing is found in the intellisense window.
I have found that if I delete the red box and then move the cursor outside of the parentheses then go back inside the parentheses, the intellisense will then pick up the variable.
My question is: Is there a better way to use the if snippet with variables? Is this my my computer?