TODO annotation usage

Source: Internet
Author: User

In the course of reading the niugu news and publishing system, the teacher told me that this annotation method is very useful. In the process of a large project, there will be a lot of class modules and a great workload, how can we mark unfinished work items? This is an issue worth consideration. Visual Studio 2010 provides a lot of tips for coding.
TODO annotation: similar to our bookmarks, marking what we need to do next time.
 
Public DataTable SelectHotNews ()
{
// TODO: extract 10 hot news
DataTable dt = new DataTable ();
Dt = sqlhelper. ExecuteQuery ("news_selectHotNews", CommandType. StoredProcedure );
Return dt;
}
 
Open the "task list" shortcut key (Ctrl + Alt + K) shown in the following figure ).. You can find the last unfinished job.
 
Public DataTable SelectHotNews ()
{
// DONE: extract 10 hot news
DataTable dt = new DataTable ();
Dt = sqlhelper. ExecuteQuery ("news_selectHotNews", CommandType. StoredProcedure );
Return dt;
}
 
Change TODO to DONE to cancel the comments (indicating that the work is completed)
Note Tip 2:
Does this annotation appear in the code segment clearly understand the functions of the module. (Such a comment belongs to the C # language-specific comment format)


Method: Right-click to insert a code segment or edit it. Choose intelliisence to insert a code segment.

Select C #
Select the code segment to insert:
 
# Region fetch 10 hot news
Public DataTable SelectHotNews ()
{
// DONE: extract 10 hot news
DataTable dt = new DataTable ();
Dt = sqlhelper. ExecuteQuery ("news_selectHotNews", CommandType. StoredProcedure );
Return dt;
}
# Endregion
 
Show outline to fold to definition display is the above EFFECT ~ \ (Too many rows )/~ La la


Author Zheng wenliang

Related Article

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.