重新磨刀。如何添加自定义命令(模板)?
我使用 Visual Studio 2010 和 ReSharper 6.1。我经常需要创建一些大写的变量/常量。那么,如何在 ReSharper 中创建自定义命令以应用大写的变量/常量名称? 例如,我输入了下一个代码:
private const string myStoredProcedure1 = "something";
并且我需要将其转换为
private const string MYSTOREDPROCEDURE1 = "something";
I use Visual Studio 2010 and ReSharper 6.1. I often need to create some variables/constants in upper case. So, how can I make custom command in ReSharper to apply variable/const name in Upper Case?
For example I typed the next code:
private const string myStoredProcedure1 = "something";
and I need convert it to
private const string MYSTOREDPROCEDURE1 = "something";
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您进入 C# 的代码样式设置,您可以指定您想要的变量名称方式,包括全部大写,这可能就是您想要的。应用此功能后,R# 将抱怨所有大小写不正确的变量,并为您提供自动更改它们的选项。
If you go into Code Style settings for C#, you can specify the ways you want variables names, including ALL UPPERCASE, which is probably what you want. After you apply this, R# will complain about all variables that aren't in the correct case and will offer you the option to automatically change them.