“使用自动属性”重构建议 [英] "Use auto property" refactoring suggestion
问题描述
我有一些类变量和属性:
私人 ToolStrip _toolBar ;
公开 ToolStrip 工具栏
{
得到 { 返回 _toolBar ; }
}
Normaly,当我将鼠标或光标指向它们时,VS建议重构
"使用自动属性"
在我完成这个重构之后,一个变量重构不再适用于其他变量。它不再作为建议出现一段时间了。只有几分钟之后它再次可用。有人也遇到过这个问题吗?
我正在使用Microsoft Visual Studio Enterprise 2017版本15.5.4。
你的VS 2017中的扩展
?
请分享我们关于该功能的视频或截图,也许我们可以更好地理解它。
此外,如果您发布的内容与ReShaper相关,我建议您将此问题发布到以下论坛以获得专业答案。
https://resharper-support.jetbrains.com/hc/en-us
感谢您的理解。
注意:此响应包含对第三方万维网站点的引用。微软提供此信息是为了方便您。
Microsoft不控制这些网站,也没有测试在这些网站上找到的任何软件或信息;
因此,Microsoft无法对在那里找到的任何软件或信息的质量,安全性或适用性做出任何陈述。
问候,
Judyzh 跨度> 跨度>
I have some class variables and properies for them:
private ToolStrip _toolBar;
public ToolStrip ToolBar
{
get { return _toolBar; }
}
Normaly, when I point mouse or cursor on them, VS suggests to refactor with
"Use auto property"
After I've done this refactoring for one variable refactoring is not available anymore for other variables. It doesn't appear anymore as suggestion for some time. Only after few minutes it is available again. Did anyone face this issue too?
I'm using Microsoft Visual Studio Enterprise 2017 Version 15.5.4.
Welcome to the MSDN forum.
I use Microsoft Visual Studio Enterprise 2017 version 15.5.4 to test your issue, I can’t find "Use auto property" when point mouse or cursor on the properties.
But if I install Resharper extensions in my VS 2017, I can find "use auto property", and it works fine.
Did you install ReSharperextensions in your VS 2017?
Please share us a video or screenshot about the function, maybe we could understand it better.
In addition, if you issue is related to ReShaper, I suggest you could post this issue to the following forum for a professional answer.
https://resharper-support.jetbrains.com/hc/en-us
Thanks for your understanding.
Note: This response contains a reference to a third-party World Wide Web site. Microsoft is providing this information as a convenience to you.
Microsoft does not control these sites and has not tested any software or information found on these sites;
Therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there.
There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.
Regards,
Judyzh
这篇关于“使用自动属性”重构建议的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!