进入VS安装目录,比如:
D:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\ItemTemplatesCache\CSharp\Code\2052\Class.zip
编辑Class.cs文件如下:
using System;
using System.Collections.Generic;
$if$ ($targetframeworkversion$ >= 3.5)using System.Linq;
$endif$using System.Text;
namespace $rootnamespace$
{
/* CLR版本: $clrversion$
* 新建项输入的名称: $itemname$
* 机器名称: $machinename$
* 注册组织: $registeredorganization$
* 命名空间: $rootnamespace$
* 文件名: $safeitemrootname$
* 当前系统时间: $time$
* 用户所在域: $userdomain$
* 当前登录用户名: $username$
* 创建年份: $year$
* 作者:PWL
*
*/
public class $safeitemrootname$
{
}
}
VS自动添加类注释
最新推荐文章于 2023-07-24 20:12:42 发布