Predefined live templates
This topic lists all predefined live templates in JetBrains Rider 2024.2.
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 | |
DOTS Baker | |
DOTS IComponentData | |
DOTS IJob Entity | |
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 | |
Unity | |
Current file context | |
Insert new GUID | |
Unity CreateAssetMenu attribute | |
Unity log warning | |
Unity log exception | |
Unity menu item handler | |
Unity serialized field | |
Unity log error | |
Unity log object/message | |
Unity RequireComponent attribute | |
Unity property with serialized backing field | |
Unity coroutine method | |
Unity log variable | |
ShaderLab Integer property | |
ShaderLab Blend 2x multiplicative (srcdst+dstsrc) | |
ShaderLab Float property | |
ShaderLab Surface Shader | |
ShaderLab Shader block | |
ShaderLab 3D property | |
ShaderLab Vector property | |
ShaderLab Blend soft additive (src*(1-dst)+dst) | |
ShaderLab Blend additive (src + dst) | |
ShaderLab Vertex/Fragment Shader | |
ShaderLab 2D property | |
ShaderLab Blend traditional transparency (src*srcAlpha+(1-srcAlpha)*dst) | |
ShaderLab CubeArray property | |
ShaderLab Blend multiplicative (src*dst) | |
ShaderLab Cube property | |
ShaderLab 2DArray property | |
ShaderLab Color property | |
ShaderLab Blend premultiplied transparency (src+(1-srcAlpha)*dst) | |
ShaderLab Vertex/Fragment Shader Pass |