现在大多数公司都规定程序员在程序文件的头部加上版权信息,常常是以下格式:











在 "盘符:\Program Files\Microsoft Visual Studio .NET 2003\VC#\VC#Wizards" 下有很多添加C#模块的模板和脚本,如下图:

其实我们添加的任何类型的项,都是首先初始化这里面定义的模板格式。我们可以看一下CSharpAddCommponentWiz / Temlates / 2052 / NewCSharpFile.cs ,是不是和我们添加一个新类的格式一样?修改它就等于修改我们添加的新类格式,我把它修改成:






























大家可以看出来[!output SAFE_CLASS_NAME]就是你添加的类名字,但是请注意,我用红色标识的CREATED_DATETIME,也就是创建日期,是没有定义的,需要我们自已定义。
打开 "盘符:\Program Files\Microsoft Visual Studio .NET 2003\VC#\VC#Wizards\2052\common.js",在AddFilesToCSharpProject函数里添加如下脚本,






到此,我们就把模板修改完了,添加其它项的模板修改方法都一样。