Book Image

ReSharper Essentials

By : Lukasz Gasior
Book Image

ReSharper Essentials

By: Lukasz Gasior

Overview of this book

Table of Contents (18 chapters)
ReSharper Essentials
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Mnemonic Live Templates


The next plugin we would like to recommend is the Mnemonic Live Templates for C# and VB.NET.

It provides a set of incredibly useful live templates that generate code using structured abbreviations.

You can use c for creating classes, i for interfaces, m for methods, v for fields, and p for properties. By using a capital letter, you can create static objects.

You can also specify a return type with a second letter. For example, pi will create a property that returns int, ps will return string, pby will return byte, and so on.

By using the ~ sign, you can specify collections as return types. For example, p~s will create a property that returns a collection of strings.

Really awesome, isn't it?

Using these templates is very intuitive, and you can review a list of newly added templates in the Templates Explorer window by filtering the mnemonics category.

More information about this plugin can be found at https://resharper-plugins.jetbrains.com/packages/mnemonics/.