Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can Visual Studio editor convert from all-caps to camel case? [duplicate]

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?

like image 897
Branko Dimitrijevic Avatar asked Apr 15 '13 16:04

Branko Dimitrijevic


People also ask

How do you convert a CamelCase?

Approach: Use str. replace() method to replace the first character of string into lower case and other characters after space will be into upper case. The toUpperCase() and toLowerCase() methods are used to convert the string character into upper case and lower case respectively.

How do I use CamelCase in Visual Studio?

CamelCase READMEUse ctrl+alt+c for Windows/Linux and ctrl+cmd+c on Mac.

How do I make a CamelCase in C#?

In camel casing, two or more words are placed together without any space or underscore ( _ ), but the first letter of the first word is in lowercase and the first letter of the next word is capitalized.


1 Answers

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.

like image 117
Kenneth Garza Avatar answered Oct 08 '22 19:10

Kenneth Garza