"Surround With" template availability scope

I'm confused about the difference between "where statement is allowed" and
"where expression is allowed". I would think a statement has to be a semantically
correct statement ending in a semi-colon. I would think an expression could
be a string literal, integer, or any code fragment that does not have to
end with a semi-colon, but it does not appear to work this way.

Specifically, I have the following surround with template that should put
the selection in the using expression:
using($SELECTION$)
{$END$}

But it never appears in the select list I have Availability set to "where
expression is allowed". What is going on?


1 comment
Comment actions Permalink

But it never appears in the select list when I have Availability set to
"where expression is allowed". What is going on?


Ooops, I left some info out of the previous question. When I select text
like "DataTable table = DAL.GetData()", my template does not appear in the
quick pick list I have Availability set to "where expression is allowed".
If I change Availability to "where statement is allowed", I have to include
the semi-colon, but the semi-colon in the selection makes my using expression
semantically incorrect. I have to set Availability to "everywhere" to get
this to work as I expect it to.

This is what leads me to ask, is "where expression is allowed" working the
way it is expected to?


0

Please sign in to leave a comment.