Templates

ReSharper provides you with a very powerful template mechanism that generates code for the most commonly used actions, such as creating a new class, constructor, and the const variables.

Templates as snippets

Visual Studio provides you with simple templates called snippets by default. ReSharper extends these templates with Live Templates. Live Templates can be accessed using the Ctrl + E, L shortcut or by using an associated name.

Do you need a GUID? Just write nguid and press Tab. Do you need an iterator? Write iterindex. Maybe you need to override the Equals() method? Write equals.

By pressing Ctrl + E, L, you can review all the available Live Templates.

File template

With Live Templates, you can generate some parts of code but ReSharper ...

Get ReSharper Essentials now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.