views:

44

answers:

2

I'm in love with the function in Eclipse "assign to field". Basically, when I have

getString();

and I type ctrl-2, Eclipse converts this into

String getString = getString();

Is this possible in VS 2010?

+1  A: 

Hi Frank...

I have not worked in eclipse for years so I am not familiar with the example, but have you tried code snippets in VS?

There is a tool for customizing them that you can get from here.

Mark Pearl
+1 thanks for the link!
Jonathan
+1  A: 

I believe the thing you're looking for is a refactoring typically called "introduce variable". As far as I know, Visual Studio doesn't support this. However ReSharper and other tools like it do.

Rytmis
Thanks, do you know of a free alternative?
Frank Meulenaar
[CodeRush Xpress](http://www.devexpress.com/Products/Visual_Studio_Add-in/CodeRushX/) seems to support it.
Rytmis