JetBrains Rider 2020.3 Help

Predefined Live Templates

This section lists all predefined Live templates in JetBrains Rider 2020.3.

Live/Surround templates can be used for generating code in existing files and (if there is the $SELECTION$ parameter in the template body) for surrounding code fragments with template code, such as try...catch statement.
Each live template is identified by a Shortcut— a short string of characters, for example foreach— that you can type right in the editor to invoke the template.

Index of Live Templates

TemplateDescription
C#
ctxCurrent file context
nguidInsert new GUID
joinJoin clause in language integrated query
fromLanguage-Integrated Query
foreachforeach block
itliIterate a IList<T>
itarIterate an array
ritarIterate an array in inverse order
forSimple "for" loop
sfcSafely cast variable
psvmThe "Main" method declaration
outvPrint value of a variable
outPrint a string
asrtMake an assertion
asrtnAssert expression not null
thrthrow new
pcipublic const int
pcspublic const string
psrpublic static readonly
propProperty
earCreate an empty array
#if (Imported Visual C# Snippets)
#region (Imported Visual C# Snippets)
enum (Imported Visual C# Snippets)
else (Imported Visual C# Snippets)else statement
~ (Imported Visual C# Snippets)Destructor
ctor (Imported Visual C# Snippets)Constructor
cw (Imported Visual C# Snippets)Console.WriteLine
class (Imported Visual C# Snippets)
Exception (Imported Visual C# Snippets)
struct (Imported Visual C# Snippets)
forr (Imported Visual C# Snippets)Reverse 'for' loop
namespace (Imported Visual C# Snippets)
interface (Imported Visual C# Snippets)
sim (Imported Visual C# Snippets)'int Main' method
indexer (Imported Visual C# Snippets)
svm (Imported Visual C# Snippets)'void Main' method
unsafe (Imported Visual C# Snippets)unsafe statement
unchecked (Imported Visual C# Snippets)unchecked block
tryf (Imported Visual C# Snippets)try finally
try (Imported Visual C# Snippets)try catch
switch (Imported Visual C# Snippets)switch statement
while (Imported Visual C# Snippets)while loop
iterator (Imported Visual C# Snippets)simple iterator
propg (Imported Visual C# Snippets)Property with a 'get' accessor and a private 'set' accessor
Attribute (Imported Visual C# Snippets)Attribute using recommended pattern
do (Imported Visual C# Snippets)do...while loop
checked (Imported Visual C# Snippets)checked block
if (Imported Visual C# Snippets)if statement
lock (Imported Visual C# Snippets)lock statement
mbox (Imported Visual C# Snippets)MessageBox.Show
using (Imported Visual C# Snippets)using statement
halASP.NET MVC Html.ActionLink
uaASP.NET MVC Url.Action
rtaASP.NET Controller RedirectToAction
attachedPropertyAttached property
dependencyPropertyDependency property
test
VB.NET
ctxCurrent file context
nguidInsert new GUID
foreachFor Each block
itarIterate an array
itliIterate generic System.Collections.Generic.IList(Of T)
forSimple "For" loop
ritarIterate array in reverse order
DimDeclare a variable
asrtMake an assertion
outPrint a string
outvPrint value of an expression
pssmPublic Shared Sub Main
sfcSafely cast a variable
subSubroutine declaration
funFunction declaration
dcDirectCast clause
tcTryCast clause
ctCType clause
ByRefByRef parameter
ByValByVal parameter
selSelect case statement
attachedPropertyAttached property
dependencyPropertyDependency property
Razor
ctxCurrent file context
nguidInsert new GUID
<scriptCreate script tag
tCreate tag
tcCreate closed tag
aCreate tag attribute
@inheritsRazor inherits directive
@modelRazor model directive
@sectionRazor section
ASP.NET
ctxCurrent file context
nguidInsert new GUID
<scriptCreate script tag
tCreate ASP.NET tag
tcCreate closed tag
aCreate tag attribute
<asp:HyperLinkASP.NET Hyperlink
foreachforeach block
Last modified: 25 March 2021