目录



C#注释编码规范

修改日志

文件的创建

//################################################
// Create by wuyingqiang.cn on 2016-05-04
//################################################

代码块的修改

//++++++++++++++++++++++++++++++++++++++++++++++++
// 修正概要:增加子部门图标,mantis #0001834
// 修正日志:Add/Update/Delete by wuyingqiang.cn on 2016-05-04
public string Organization { get; set; }
public string User { get; set; }
……
//++++++++++++++++++++++++++++++++++++++++++++++++

追加例

//++++++++++++++++++++++++++++++++++++++++++++++++
// 修正概要:追加组织机构、用户属性,mantis #0001834
// 修正日志:Add by wuyingqiang.cn on 2016-05-04
public string Organization { get; set; }
public string User { get; set; }
……
//++++++++++++++++++++++++++++++++++++++++++++++++

修改例

//++++++++++++++++++++++++++++++++++++++++++++++++
// 修正概要:修改……,mantis #0001834
// 修正日志:Update by wuyingqiang.cn on 2016-05-04
//public string Organization { get; set; }
//public string User { get; set; }
public string Organization2 { get; set; }
public string User2 { get; set; }
//++++++++++++++++++++++++++++++++++++++++++++++++

删除例

//++++++++++++++++++++++++++++++++++++++++++++++++
// 修正概要:……,mantis #0001834
// 修正日志:Delete by wuyingqiang.cn on 2016-05-04
//public string Organization { get; set; }
//public string User { get; set; }
//++++++++++++++++++++++++++++++++++++++++++++++++

方法(函数)的注释

方法(函数)头

/// <summary>
/// 删除最后字符
/// </summary>
/// <param name="str">源字符串</param>
/// <param name="Length">删除长度</param>
/// <returns>返回删除后的字符串</returns>
public static string DeleteLastLength(string str, int Length)
{
    if (string.IsNullOrEmpty(str))
        return "";
    str = str.Substring(0, str.Length - Length);//
    return str;
}

首篇前一篇后一篇末篇