VS adds the file description when creating the C # class,
When creating a new C # class, you must add some information at the beginning of the file to describe the function of the class and the information about file creation and protect your copyright. As follows:
1 /*********************************************************************************** 2 * Filename :Class3 3 * Description : 4 * Date:2014/5/15 16:31:29 5 * Machinename:PC-201305061330 6 * Created by: <T> Andy Sun 7 * All rights reserved 8 * 9 * ChangeLog: 10 * 2014/5/15 16:31:29: 11 * Created! 12 ************************************************************************************/ 13 using System; 14 using System.Collections.Generic; 15 using System.Linq; 16 using System.Text; 17 using System.Threading.Tasks;
Manual addition is time-consuming and labor-consuming. Fortunately, vs provides us with a template change interface. The following is a brief introduction.
1. First, find the C # class template. The installation directory % \ Common7 \ IDE \ ItemTemplatesCache \ CSharp \ Code \ 2052 \ Class (or % VS installation directory % \ Common7 \ IDE \ ItemTemplates \ CSharp \ Code/2052 \ Class) class. cs file.
2. open the file and add the following information to the file header:
1 /*********************************************************************************** 2 * Filename :$safeitemrootname$ 3 * Description : 4 * Date:$time$ 5 * Machinename:$machinename$ 6 * Created by: <T> Andy Sun 7 * All rights reserved 8 * 9 * ChangeLog: 10 * $time$: 11 * Created! 12 ************************************************************************************/ 13 using System; 14 using System.Collections.Generic; 15 $if$ ($targetframeworkversion$ >= 3.5)using System.Linq; 16 $endif$using System.Text; 17 $if$ ($targetframeworkversion$ >= 4.5)using System.Threading.Tasks; 18 $endif$ 19 namespace $rootnamespace$ 20 { 21 class $safeitemrootname$ 22 { 23 } 24 }
3. After saving the file, you can see that the relevant information is automatically added to the file header when you create a C # class.