VB.NET
ReSharper comes with a number of predefined surround templates. You can use them "as is" or customize according to your individual requirements and programming style.
Some templates are parameterized, requiring that you fill in some parameters after the template code is inserted.
Two parameters specified in preview listings are common for most templates:
-
$SELECTION$specifies the position of previously selected code within an applied template. -
$END$denotes the position of the caret after a template is applied.
| Template name | Description |
| CType |
Purpose CType($SELECTION$, $TYPE$) Before expansion Parameters
|
| DirectCast |
Purpose DirectCast($SELECTION$, $TYPE$) Before expansion Parameters
|
| If |
Purpose
If $END$ Then
$SELECTION$
End If
Before expansion Parameters
|
| If..Else |
Purpose
If $COND$ Then
$SELECTION$
Else
$END$
End If
Before expansion Parameters
|
| namespace |
Purpose Namespace $END$ $SELECTION$ End Namespace Before expansion Parameters
|
| SyncLock |
Purpose
SyncLock $END$
$SELECTION$
End SyncLock
Before expansion Parameters
|
| TryCast |
Purpose TryCast($SELECTION$, $TYPE$) Before expansion Parameters
|
| Using |
Purpose
Using $END$
$SELECTION$
End Using
Before expansion Parameters
|
