Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
ReSharper Essentials

You're reading from   ReSharper Essentials Make your Microsoft Visual Studio work smarter with ReSharper.

Arrow left icon
Product type Paperback
Published in Feb 2014
Publisher Packt
ISBN-13 9781849698702
Length 124 pages
Edition Edition
Arrow right icon
Author (1):
Arrow left icon
Lukasz Gasior Lukasz Gasior
Author Profile Icon Lukasz Gasior
Lukasz Gasior
Arrow right icon
View More author details
Toc

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 allows you to generate whole files too.

Creating a new file from a template can be done by pressing Ctrl + Alt + Insert in the code editor or by pressing Alt + Insert in the Solution Explorer.

Customization

Each ReSharper template can be configured....

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image