Yara
Yara

Reputation: 4565

Resharper. How to add custom command (template)?

I use Visual Studio 2010 and ReSharper 6.1. I often need to create some variables/constants in upper case. So, how can I make custom command in ReSharper to apply variable/const name in Upper Case? For example I typed the next code:

private const string myStoredProcedure1 = "something";

and I need convert it to

private const string MYSTOREDPROCEDURE1 = "something";

Upvotes: 0

Views: 276

Answers (1)

Dmitri Nesteruk
Dmitri Nesteruk

Reputation: 23798

If you go into Code Style settings for C#, you can specify the ways you want variables names, including ALL UPPERCASE, which is probably what you want. After you apply this, R# will complain about all variables that aren't in the correct case and will offer you the option to automatically change them.

Upvotes: 1

Related Questions