重新磨刀。如何添加自定义命令(模板)?

发布于 2024-12-23 07:38:05 字数 298 浏览 5 评论 0原文

我使用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

等待我真够勒 2024-12-30 07:38:05

如果您进入 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文