在我的电脑上找到 安装目录:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\ItemTemplatesCache\Web\CSharp
\2052\Class.zip
打开Class.zip中的 Class.cs文件 就会看到如下所示代码:
using System;
using System.Collections.Generic;
$if$ ($targetframeworkversion$ >= 3.5)using System.Linq;
$endif$using System.Web;
/// <summary>
///$safeitemrootname$ 的摘要说明
/// </summary>
public class $safeitemrootname$
{
public $safeitemrootname$()
{
//
//TODO: 在此处添加构造函数逻辑
//
}
}
然后只要在其顶部加入版权信息代码就可以了 如:******************************版权信息**********************
保存后,再新建cs文件时,就会自动在其顶部加上如上代码,怎么样,是不是很酷,赶快去试下吧。