StyleCop SA1630

And*_*ich 0 c# stylecop

这些方法有什么区别,为什么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)
        {

        }
Run Code Online (Sandbox Code Playgroud)


谢谢!

ken*_*n2k 6

你的一些参数只有一个单词作为文档,这显然是不够的(至少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>
Run Code Online (Sandbox Code Playgroud)