One minute. class Header comments

Source: Internet
Author: User

More to the back to find our study gradually professional, take notes, good notes to help others on the understanding of the program and later maintenance, more contact in the Itoo is the class inside the method or variables, such as the comments, a few days before the examination room cooperation, Finding a good annotation style gives the impression and feeling really different. Recently, I also re-frame in the Itoo, the need to add many of their own classes, before the project is to put the head comments in the Toolbox, the use of direct drag, of course, this is one of them. This time I thought of myself in the computer room also used a method, directly in the installation path to modify the new class template. Because the contents of the class header comments are many, and the contents of the header comments in each class or form are mostly similar, copy and paste each time you create a new class or form (and of course you have to modify it slightly)? Now it's okay to have vs auto-Generate header comments. There are many articles on the internet that stand on the shoulders of giants.

How do I set the class header comment template?

1, open the VS2012 installation directory, find the Common7 folder, and then open the D:\VS\Common7\IDE\ItemTemplates\CSharp\Code\2052\Class, Locate the Class.cs file and open it in Notepad, adding the template you want.

/**********************************************************************************     * Developer: 李立平     * Development Group: 王静娜, Yang, Zhang Zijie     * Class Description:      * Development time: $time $     * Development version: V4.0.0    ****************************************************** /using system;using System.Collections.Generic; $if $ ($targetframeworkversion $ >= 3.5 Using System.Linq; $endif $using System.Text; $if $ ($targetframeworkversion $ >= 4.5) using system.threading.tasks;$ Endif$namespace $rootnamespace ${    class $safeitemrootname $    {    }}

2, then open VS2012, create a new class try the effect: sure enough, when you create a new class, VS will automatically generate The header file is commented out.


Of course, there are some interfaces, WebClass and other header settings, as well as other language settings, AX, 工欲善其事 its prerequisite said this is the truth.

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

One minute. class Header comments

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.