Predefined live templates
This topic lists all predefined live templates in JetBrains Rider 2021.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
Template | Description |
---|---|
C# | |
Current file context | |
Insert new GUID | |
Join clause in language integrated query | |
Language-Integrated Query | |
foreach block | |
Iterate a IList<T> | |
Iterate an array | |
Iterate an array in inverse order | |
Simple "for" loop | |
Safely cast variable | |
The "Main" method declaration | |
Print value of a variable | |
Print a string | |
Make an assertion | |
Assert expression not null | |
throw new | |
public const int | |
public const string | |
public static readonly | |
Property | |
Create an empty array | |
else statement | |
Destructor | |
Constructor | |
Console.WriteLine | |
Reverse 'for' loop | |
'int Main' method | |
'void Main' method | |
unsafe statement | |
unchecked block | |
try finally | |
try catch | |
switch statement | |
while loop | |
simple iterator | |
Property with a 'get' accessor and a private 'set' accessor | |
Attribute using recommended pattern | |
do...while loop | |
checked block | |
if statement | |
lock statement | |
MessageBox.Show | |
using statement | |
ASP.NET MVC Html.ActionLink | |
ASP.NET MVC Url.Action | |
ASP.NET Controller RedirectToAction | |
Attached property | |
Dependency property | |
VB.NET | |
Current file context | |
Insert new GUID | |
For Each block | |
Iterate an array | |
Iterate generic System.Collections.Generic.IList(Of T) | |
Simple "For" loop | |
Iterate array in reverse order | |
Declare a variable | |
Make an assertion | |
Print a string | |
Print value of an expression | |
Public Shared Sub Main | |
Safely cast a variable | |
Subroutine declaration | |
Function declaration | |
DirectCast clause | |
TryCast clause | |
CType clause | |
ByRef parameter | |
ByVal parameter | |
Select case statement | |
Attached property | |
Dependency property | |
Razor | |
Current file context | |
Insert new GUID | |
Create script tag | |
Create tag | |
Create closed tag | |
Create tag attribute | |
Razor inherits directive | |
Razor model directive | |
Razor section | |
ASP.NET | |
Current file context | |
Insert new GUID | |
Create script tag | |
Create ASP.NET tag | |
Create closed tag | |
Create tag attribute | |
ASP.NET Hyperlink | |
foreach block |