Visual Studio 2010“分配给局部变量"功能? [英] Visual Studio 2010 'Assign to local variable' function?
本文介绍了Visual Studio 2010“分配给局部变量"功能?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我爱上了Eclipse分配给字段"中的函数.基本上,当我有
I'm in love with the function in Eclipse "assign to field". Basically, when I have
getString();
,然后输入 Ctrl + 2 ,Eclipse将其转换为
and I type Ctrl + 2, Eclipse converts this into
String getString = getString();
在VS 2010中有可能吗?
Is this possible in VS 2010?
推荐答案
我相信您正在寻找的东西是通常称为引入变量"的重构.据我所知,Visual Studio不支持此功能.但是 ReSharper 和其他类似工具.
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.
这篇关于Visual Studio 2010“分配给局部变量"功能?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文