风格警察 SA1630

发布于 2025-01-05 17:29:23 字数 1217 浏览 1 评论 0原文

这些方法之间有什么区别,为什么 SortDropDown 正确但 Page_load 和 GetCases 不正确?

我无法理解。
以及如何解决这个问题?

在此处输入图像描述

编辑在图片上看不清

代码:

        /// <summary>
        /// Sort items in drop down list
        /// </summary>
        /// <param name="dropDown">Drop down list</param>
        internal static void SortDropDown(ref DropDownList dropDown)
        {

        }

        /// <summary>
        /// PageLoad event handler 
        /// </summary>
        /// <param name="sender">Sender</param>
        /// <param name="e">Event Args</param>
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        /// <summary>
        /// Get all cases by authority and ShopNo
        /// </summary>
        /// <param name="authority">Authority</param>
        /// <param name="shopNo">Shop No</param>
        /// <returns>Cases list</returns>
        private static IEnumerable<CaseSummary> GetCases(string authority, string shopNo)
        {

        }


谢谢!

What difference between this methods, why SortDropDown is correct but Page_load and GetCases are not ?

I cant understand.

And how to fix this?

enter image description here

Edit cant see well on picture

Code:

        /// <summary>
        /// Sort items in drop down list
        /// </summary>
        /// <param name="dropDown">Drop down list</param>
        internal static void SortDropDown(ref DropDownList dropDown)
        {

        }

        /// <summary>
        /// PageLoad event handler 
        /// </summary>
        /// <param name="sender">Sender</param>
        /// <param name="e">Event Args</param>
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        /// <summary>
        /// Get all cases by authority and ShopNo
        /// </summary>
        /// <param name="authority">Authority</param>
        /// <param name="shopNo">Shop No</param>
        /// <returns>Cases list</returns>
        private static IEnumerable<CaseSummary> GetCases(string authority, string shopNo)
        {

        }

Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(2

对你再特殊 2025-01-12 17:29:23

您的某些参数只有一个单词作为文档,这显然是不够的(至少需要 10 个字符+至少一个空格)。

  • Sender
  • Authority

编写有关这些参数用途的有用描述。

另外,对于事件处理程序,您确实应该采用 Microsoft 使用的文档文本:

/// <summary>
/// Handles the XXXXX event of YYYY.
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>

Some of your parameters have a single word as documentation, which is obviously not enough (at least 10 characters + at least a whitespace are required).

  • Sender
  • Authority

Write a useful description about what is the purpose of these parameters.

Also, for event handlers, you really should adopt the documentation text that Microsoft uses:

/// <summary>
/// Handles the XXXXX event of YYYY.
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
我很OK 2025-01-12 17:29:23

不同之处在于,文档使用一个词来描述 Page_Load() 事件和 GetCases() 方法的参数之一,而 SortDropDown()< /code> 方法文档使用多个单词来描述其参数。更具描述性,您将避免违反规则。

The difference is that the documentation uses one word to describe one of the parameters for the Page_Load() event and GetCases() method, whereas the SortDropDown() method documentation uses more than one word to describe its parameter. Be more descriptive and you will avoid this rule violation.

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