Predefined live templates
This topic lists all predefined live templates in JetBrains Rider 2024.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 | |
C/C++ | |
Current file context | |
Insert new GUID | |
union declaration | |
XML documentation template | |
Write to standard output stream | |
Write to standard log stream | |
Copy constructor declaration with body | |
Read from standard input stream | |
Default constructor declaration with body | |
Move constructor declaration with body | |
else statement | |
Virtual destructor declaration with body | |
Function 'to_string' for enum | |
Destructor declaration with body | |
Enum class declaration | |
Reversed for | |
Write to standard log stream | |
Documentation template | |
Write to standard error stream | |
Write to standard error stream | |
Read from standard input stream | |
Class declaration | |
Write to standard output stream | |
do while loop | |
Enum declaration | |
range-based for loop | |
for loop pattern with integer index | |
if statement | |
Include guard | |
main declaration | |
namespace declaration | |
struct declaration | |
switch statement | |
try catch statement | |
while statement | |
Log a formatted message using UE_LOG | |
UCLASS declaration | |
UENUM declaration | |
UENUM declaration using the "enum class" syntax | |
UINTERFACE declaration | |
USTRUCT declaration | |
Log a formatted message using UE_LOGFMT | |
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 |