First step: Find the template file
Path: C:\Program Files (x86) \microsoft Visual Studio 14.0\common7\ide\itemtemplates\csharp\code\2052\class
File name: Class.cs
Step two: Copy the template file to the desktop
Because the template file is read-only, it cannot be directly modified.
Step three: Modify the template file
As follows:
/************************************************ * Author:author * Function: * history:created by author $time $ * ***********************************************/namespace$rootnamespace ${usingSystem; usingSystem.Collections.Generic; $if$ ($targetframeworkversion $ >=3.5)usingSystem.Linq; $endif $usingSystem.Text; $if$ ($targetframeworkversion $ >=4.5)usingSystem.Threading.Tasks; $endif $/// <summary> ///todo:update Summary. /// </summary> Public class$safeitemrootname $ {#regionFields#endregion #regionConstructors and destructors#endregion #regionPublic Methods and Operators#endregion }}
Fourth step: Overwrite template file
Get!!!
Now it's time to add your own class files.
As follows:
/************************************************ * Author:author * Function: * history:created by author 2016/6/ 10:53:37 * ***********************************************/namespaceABC. dblight.external{usingSystem; usingSystem.Collections.Generic; usingSystem.Linq; usingSystem.Text; usingSystem.Threading.Tasks; /// <summary> ///todo:update Summary. /// </summary> Public classClass1 {#regionFields#endregion #regionConstructors and destructors#endregion #regionPublic Methods and Operators#endregion }}
Visual Studio 2015 modifies the class classes file template