16

Is there a command or an addin in Visual Studio 2012 that would convert a selected piece of C# source code from SOME_NAME to SomeName?

Branko Dimitrijevic
  • 50,809
  • 10
  • 93
  • 167

4 Answers4

9

I use resharper 7.0. It has rules on naming conventions so when I have stuff named SOME_NAME it will let me know and It will change it to the name based on the rule convention.

it will also apply naming convention to change that variable name to the code in which uses it.

I have no idea if resharper will do it all for you at once though. I've only used it for one off stuff.

Kenneth Garza
  • 1,886
  • 14
  • 12
1

When I had to do this in the past, I used the following steps:

  1. Select the text OME_NAME and press Ctrl+U (convert text to lower case).
  2. Select the text _n and type N.
  3. Press Alt+Shift+F10 (show smart tag) to apply a rename refactoring.
Sam Harwell
  • 97,721
  • 20
  • 209
  • 280
0

Short answer no, but You can do a macro and use it or use some productivity tools as resharper.

Luis Tellez
  • 2,785
  • 1
  • 20
  • 28
0

As far as I know the only built in case shortcuts are to change to all uppercase or all lowercase. Here's the MSDN documentation for the case shortcuts in Visual Studio 2012: http://msdn.microsoft.com/en-us/library/ms165341.aspx

Splendor
  • 1,386
  • 6
  • 28
  • 62