ReSharper 2016.1 Help

Predefined Surround Templates for VB.NET

ReSharper | Templates Explorer | Surround Templates | VB.NET

This topic lists all predefined surround templates for VB.NET in ReSharper 2016.1.1. For more information about surround templates, see Surrounding Code Fragments with Templates

TemplateDetails
If

Put the selection into the statement block following Then in the If-Then construct

Scope VB.NET 8+ statements

Body

If $END$ Then $SELECTION$ End If

Parameters

  • SELECTION - The text selected by the user before invoking the template.
  • END - The caret position after the template is applied.

Before expansion
Reference__Options__Templates__Surround_With_Templates__Predefined__VB.NET__If__before
After expansion

Reference__Options__Templates__Surround_With_Templates__Predefined__VB.NET__If__after

If..Else

Put the selection into the statement block following Then in the If-Then-Else construct

Scope VB.NET 8+ statements

Body

If $COND$ Then $SELECTION$ Else $END$ End If

Parameters

  • COND - no macro
  • SELECTION - The text selected by the user before invoking the template.
  • END - The caret position after the template is applied.

Before expansion
Reference__Options__Templates__Surround_With_Templates__Predefined__VB.NET__If..Else__before
After expansion

Reference__Options__Templates__Surround_With_Templates__Predefined__VB.NET__If..Else__after

SyncLock

Transform the selection into the SyncLock statement

Scope VB.NET 8+ statements

Body

SyncLock $END$ $SELECTION$ End SyncLock

Parameters

  • SELECTION - The text selected by the user before invoking the template.
  • END - The caret position after the template is applied.

Before expansion

Reference__Options__Templates__Surround_With_Templates__Predefined__VB.NET__SyncLock__before

After expansion
Reference__Options__Templates__Surround_With_Templates__Predefined__VB.NET__SyncLock__after

Using

Put the selection into the Using statement

Scope VB.NET 8+ statements

Body

Using $END$ $SELECTION$ End Using

Parameters

  • SELECTION - The text selected by the user before invoking the template.
  • END - The caret position after the template is applied.

Before expansion
Reference__Options__Templates__Surround_With_Templates__Predefined__VB.NET__using__before
After expansion

Reference__Options__Templates__Surround_With_Templates__Predefined__VB.NET__using__after

TryCast

Wrap the selection into the TryCast

Scope VB.NET 8+ expressions

Body

TryCast($SELECTION$, $TYPE$)

Parameters

  • TYPE - Guess type expected at this point (guessExpectedType)
  • SELECTION - The text selected by the user before invoking the template.

Before expansion

Reference__Options__Templates__Surround_With_Templates__Predefined__VB.NET__TryCast__before

After expansion
Reference__Options__Templates__Surround_With_Templates__Predefined__VB.NET__TryCast__after

CType

Transform the selection into the first parameter of the CType() function

Scope VB.NET 8+ expressions

Body

CType($SELECTION$, $TYPE$)

Parameters

  • TYPE - Guess type expected at this point (guessExpectedType)
  • SELECTION - The text selected by the user before invoking the template.

Before expansion

Reference__Options__Templates__Surround_With_Templates__Predefined__VB.NET__CType__before

After expansion
Reference__Options__Templates__Surround_With_Templates__Predefined__VB.NET__CType__after

DirectCast

Transform the selection into the first parameter of the DirectCast function.

Scope VB.NET 8+ expressions

Body

DirectCast($SELECTION$, $TYPE$)

Parameters

  • TYPE - Guess type expected at this point (guessExpectedType)
  • SELECTION - The text selected by the user before invoking the template.

Before expansion

Reference__Options__Templates__Surround_With_Templates__Predefined__VB.NET__DirectCast__before

After expansion
Reference__Options__Templates__Surround_With_Templates__Predefined__VB.NET__DirectCast__after

namespace

Add a namespace to the selected code

Scope VB.NET 8+ types or namespaces

Body

Namespace $END$ $SELECTION$ End Namespace

Parameters

  • SELECTION - The text selected by the user before invoking the template.
  • END - The caret position after the template is applied.

Before expansion

Reference__Options__Templates__Surround_With_Templates__Predefined__VB.NET__namespace__before

After expansion
Reference__Options__Templates__Surround_With_Templates__Predefined__VB.NET__namespace__after

Last modified: 19 August 2016