用了这么多多年的Visual Studio,说实话也就会用几个小快捷键。最近跟同事交流文件注释如何更方便,新学到了一招,呵呵——修改VS的模版文件,添加文件时会自动生成相关注释 。

一、模版文件位置(我VS是安装在C盘)

   C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\ItemTemplatesCache\CSharp\Code\2052\Class.zip

二、模版修改

   各位可根据自己需要进行修改,下面是我修改后的模版 

  

 1 #region Copyright

 

 2 //----------------------------------------------------------------
 3 // Copyright (C) $year$ *********公司*** 版权所有。 
 4 //
 5 // 文件名 $safeitemrootname$
 6 //
 7 // 文件功能描述
 8 // TODO
 9 // 
10 // 创建标识:姓名 Create at $time$
11 // 修改标识:
12 // 修改描述:
13 //
14 // 修改标识:
15 // 修改描述:
16 //----------------------------------------------------------------
17 #endregion
18 using System;
19 using System.Collections.Generic;
20 $if$ ($targetframeworkversion$ == 3.5)using System.Linq;
21 $endif$using System.Text;
22 
23 namespace $rootnamespace$
24 {
25     class $safeitemrootname$
26     {
27     }

28 } 

 

相关文章:

  • 2022-02-19
  • 2021-10-21
  • 2021-08-17
  • 2022-12-23
  • 2021-07-30
  • 2022-01-23
  • 2021-12-29
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-07-07
  • 2022-12-23
  • 2021-09-24
  • 2022-12-23
  • 2021-12-09
相关资源
相似解决方案