JetBrains Rider 2024.3 Help

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#

ctx

Current file context

nguid

Insert new GUID

join

Join clause in language integrated query

from

Language-Integrated Query

foreach

foreach block

itli

Iterate a IList<T>

itar

Iterate an array

ritar

Iterate an array in inverse order

for

Simple "for" loop

sfc

Safely cast variable

psvm

The "Main" method declaration

outv

Print value of a variable

out

Print a string

asrt

Make an assertion

asrtn

Assert expression not null

thr

throw new

pci

public const int

pcs

public const string

psr

public static readonly

prop

Property

ear

Create an empty array

#if

#region

enum

else

else statement

~

Destructor

ctor

Constructor

cw

Console.WriteLine

class

Exception

struct

forr

Reverse 'for' loop

namespace

interface

sim

'int Main' method

indexer

svm

'void Main' method

unsafe

unsafe statement

unchecked

unchecked block

tryf

try finally

try

try catch

switch

switch statement

while

while loop

iterator

simple iterator

propg

Property with a 'get' accessor and a private 'set' accessor

Attribute

Attribute using recommended pattern

do

do...while loop

checked

checked block

if

if statement

lock

lock statement

mbox

MessageBox.Show

using

using statement

hal

ASP.NET MVC Html.ActionLink

ua

ASP.NET MVC Url.Action

rta

ASP.NET Controller RedirectToAction

attachedProperty

Attached property

dependencyProperty

Dependency property

test

C/C++

ctx

Current file context

nguid

Insert new GUID

union

union declaration

xmldoc

XML documentation template

wcout

Write to standard output stream

wclog

Write to standard log stream

cctor

Copy constructor declaration with body

wcin

Read from standard input stream

ctor

Default constructor declaration with body

mctor

Move constructor declaration with body

else

else statement

vdtor

Virtual destructor declaration with body

enum_to_string

Function 'to_string' for enum

dtor

Destructor declaration with body

enumclass

Enum class declaration

forr

Reversed for

clog

Write to standard log stream

doc

Documentation template

wcerr

Write to standard error stream

cerr

Write to standard error stream

cin

Read from standard input stream

class

Class declaration

cout

Write to standard output stream

do

do while loop

enum

Enum declaration

foreach

range-based for loop

fori

for loop pattern with integer index

if

if statement

incg

Include guard

main

main declaration

namespace

namespace declaration

struct

struct declaration

switch

switch statement

try

try catch statement

while

while statement

UE_LOG

Log a formatted message using UE_LOG

UCLASS

UCLASS declaration

UENUM

UENUM declaration

UENUMCLASS

UENUM declaration using the "enum class" syntax

UINTERFACE

UINTERFACE declaration

USTRUCT

USTRUCT declaration

UE_LOGFMT

Log a formatted message using UE_LOGFMT

VB.NET

ctx

Current file context

nguid

Insert new GUID

foreach

For Each block

itar

Iterate an array

itli

Iterate generic System.Collections.Generic.IList(Of T)

for

Simple "For" loop

ritar

Iterate array in reverse order

Dim

Declare a variable

asrt

Make an assertion

out

Print a string

outv

Print value of an expression

pssm

Public Shared Sub Main

sfc

Safely cast a variable

sub

Subroutine declaration

fun

Function declaration

dc

DirectCast clause

tc

TryCast clause

ct

CType clause

ByRef

ByRef parameter

ByVal

ByVal parameter

sel

Select case statement

attachedProperty

Attached property

dependencyProperty

Dependency property

test

Razor

ctx

Current file context

nguid

Insert new GUID

<script

Create script tag

t

Create tag

tc

Create closed tag

a

Create tag attribute

@inherits

Razor inherits directive

@model

Razor model directive

@section

Razor section

ASP.NET

ctx

Current file context

nguid

Insert new GUID

<script

Create script tag

t

Create ASP.NET tag

tc

Create closed tag

a

Create tag attribute

<asp:HyperLink

ASP.NET Hyperlink

foreach

foreach block

Last modified: 06 November 2024