<tfoot id='xg28B'></tfoot>

      <small id='xg28B'></small><noframes id='xg28B'>

        <i id='xg28B'><tr id='xg28B'><dt id='xg28B'><q id='xg28B'><span id='xg28B'><b id='xg28B'><form id='xg28B'><ins id='xg28B'></ins><ul id='xg28B'></ul><sub id='xg28B'></sub></form><legend id='xg28B'></legend><bdo id='xg28B'><pre id='xg28B'><center id='xg28B'></center></pre></bdo></b><th id='xg28B'></th></span></q></dt></tr></i><div id='xg28B'><tfoot id='xg28B'></tfoot><dl id='xg28B'><fieldset id='xg28B'></fieldset></dl></div>

        <legend id='xg28B'><style id='xg28B'><dir id='xg28B'><q id='xg28B'></q></dir></style></legend>
        • <bdo id='xg28B'></bdo><ul id='xg28B'></ul>

      1. 如何摆脱 Visual Studio 中的命名规则违规消息?

        时间:2023-05-21
          <bdo id='sR5mK'></bdo><ul id='sR5mK'></ul>
            <tfoot id='sR5mK'></tfoot>

          • <small id='sR5mK'></small><noframes id='sR5mK'>

          • <legend id='sR5mK'><style id='sR5mK'><dir id='sR5mK'><q id='sR5mK'></q></dir></style></legend>
              <tbody id='sR5mK'></tbody>

          • <i id='sR5mK'><tr id='sR5mK'><dt id='sR5mK'><q id='sR5mK'><span id='sR5mK'><b id='sR5mK'><form id='sR5mK'><ins id='sR5mK'></ins><ul id='sR5mK'></ul><sub id='sR5mK'></sub></form><legend id='sR5mK'></legend><bdo id='sR5mK'><pre id='sR5mK'><center id='sR5mK'></center></pre></bdo></b><th id='sR5mK'></th></span></q></dt></tr></i><div id='sR5mK'><tfoot id='sR5mK'></tfoot><dl id='sR5mK'><fieldset id='sR5mK'></fieldset></dl></div>

                  本文介绍了如何摆脱 Visual Studio 中的命名规则违规消息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  限时送ChatGPT账号..

                  我刚刚安装了 Visual Studio 2017.当我打开现有网站时,我会收到各种警告消息,例如:

                  I just installed Visual Studio 2017. When I open an existing website, I get all sorts of warning messages such as this one:

                  IDE1006 命名规则违规:这些单词必须以大写开头字符:swe_calc

                  IDE1006 Naming rule violation: These words must begin with upper case characters: swe_calc

                  在代码中定义为:

                  [System.Runtime.InteropServices.DllImport("swedll32.dll")]
                  public static extern Int32 swe_calc(double tjd, int ipl, Int32 iflag, IntPtr xx, IntPtr serr);
                  

                  这也发生在我的 ASP.Net 控件中.以 DropDownList 为例:

                  This also occurs with my ASP.Net controls. As an example of a DropDownList:

                  IDE1006 命名规则违规:这些单词必须以大写开头字符:ddlMonth_SelectedIndexChanged

                  IDE1006 Naming rule violation: These words must begin with upper case characters: ddlMonth_SelectedIndexChanged

                  如何在 Visual Studio 下消除这些类型的警告?

                  How can I eliminate these type of warnings under Visual Studio?

                  推荐答案

                  这是一个新的可配置功能,如果你去

                  Its a new configurable feature, if you go to

                  工具 → 选项 → 文本编辑器 → 您的语言(我用的是 C#)→ 代码样式 → 命名

                  Tools → Options → Text Editor → Your language (I did C#) → Code Style → Naming

                  在那里我去管理样式添加骆驼案例(它在那里,但你需要将它添加到你的选择中):转到+"签名,然后相应地添加您的规则.

                  In there I went to Manage Styles add camel Case (its in there but you need to add it to your selectable): go to the "+" sign, then add your rule accordingly.

                  重要提示:关闭您的解决方案并重新打开以使更改生效.

                  Important: Close your solution and re-open it for changes to take effect.

                  例如,我只将骆驼案例用于私有方法.所以我选择 Private Method 并要求 Style 我创建的新方法camel Case";并将其设置为严重性建议(我也将其提升到顶部).

                  For example, I only use camel Case for private methods. So I choose Private Method and required Style the new one I created "camel Case" and set it to Severity Suggestion (I also promoted it to the top).

                  内置的都是建议";也可以关闭消息.

                  The built in are all "Suggestions" too so you can also just turn off Messages.

                  这篇关于如何摆脱 Visual Studio 中的命名规则违规消息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:在 Linux 上构建面向 .NET Framework 的 NuGet 包 下一篇:对类库项目使用 Entity Framework Core 迁移

                  相关文章

                  <i id='EkEdo'><tr id='EkEdo'><dt id='EkEdo'><q id='EkEdo'><span id='EkEdo'><b id='EkEdo'><form id='EkEdo'><ins id='EkEdo'></ins><ul id='EkEdo'></ul><sub id='EkEdo'></sub></form><legend id='EkEdo'></legend><bdo id='EkEdo'><pre id='EkEdo'><center id='EkEdo'></center></pre></bdo></b><th id='EkEdo'></th></span></q></dt></tr></i><div id='EkEdo'><tfoot id='EkEdo'></tfoot><dl id='EkEdo'><fieldset id='EkEdo'></fieldset></dl></div>

                1. <tfoot id='EkEdo'></tfoot>

                  <small id='EkEdo'></small><noframes id='EkEdo'>

                  • <bdo id='EkEdo'></bdo><ul id='EkEdo'></ul>

                  <legend id='EkEdo'><style id='EkEdo'><dir id='EkEdo'><q id='EkEdo'></q></dir></style></legend>