views:

94

answers:

2

Is there an Add_in to Visual studio which automatically inserts underscores between my method name Words?

For example i will write "public void ChangeEmail Should Update Email()" then press a shortcut and it will convert to "public void ChangeEmail_Should_Update_Email()"

+2  A: 

You can use Jean-Paul Boodhoo's BDD Macro - not sure about automatic though.

Note, more recently Jean-Paul has decided to move towards using AutoHotKey instead - see the following - posts So Long BDD Macro - Hello Autohotkey!!! and BDD AutoHotKey Script Update - Take 2.

Bermo
this seams the solution i was searching about, thanks.
Amr ElGarhy
@Amr, how about awarding the bounty then.
Jouke van der Maas
@Jouke van der Maas, sorry forgot to do that, SO changed how the bounty works so i forgot to award it, thank for reminding.
Amr ElGarhy
+1  A: 

ReSharper can do this. You set your naming convention, type it incorrectly and CTRL-Enter will fix it. Among the millions of other features ReSharper adds to VS...

Sam
the only problem with resharper is that you still have to write code
John Nicholas
good to know that reSharper can do it, i didn't test resharper on VS 2010, is it working fine?, asking about performance and compatibility.
Amr ElGarhy
Yes, ReSharper works great on 2010 and they just recently released 5.1 which has a lot of bug fixes (none of which were ones we ran into though).
Sam