JetBrains Rider 2019.1 Help

Predefined Surround Templates for VB.NET

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

Template

Details

If

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

Scope VB.NET 8.0+ 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.0+ 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.0+ 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.0+ 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
tc

Wrap the selection into the TryCast

Scope VB.NET 8.0+ expressions

Body
TryCast($SELECTION$, $TYPE$)
Parameters
  • TYPE - Guess type expected at this point

  • 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
ct

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

Scope VB.NET 8.0+ expressions

Body
CType($SELECTION$, $TYPE$)
Parameters
  • TYPE - Guess type expected at this point

  • 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
dc

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

Scope VB.NET 8.0+ expressions

Body
DirectCast($SELECTION$, $TYPE$)
Parameters
  • TYPE - Guess type expected at this point

  • 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.0+ 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 July 2019