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