Most people know that Visual Studio uses/* code blocks */and // code lines to annotate code,
However, there is no standard comment on functions and classes in the code.
Visual Studio provides the ability to create code reports.TheThe annotation method can be very
Good standards our annotations make the code more readable.
Below are some annotations
First, add the following tags
<Summary> </Summary>.
<Remarks> </remarks> remarks.
<Param> </param> use a parameter to describe the method in the annotation of the method declaration.
<Returns> </returns> in the comment of the method declaration, use to describe the return value.
<Newpara> </newpara> Start a new section in the comment.
Example:
Using system;
Namespace helloworld
{
/// <Summary>
/// Sample Hello world in C #
/// </Summary>
Public class helloworld
{
/// <Summary>
/// Console application entry point
/// </Summary>
/// <Param name = "ARGs"> command line arguments </param>
/// <Returns> Status Code of 0 on successful run </returns>
Public static int main (string [] ARGs)
{
System. Console. writeline ("helloworld ");
String name = system. Console. Readline ();
Return (0 );
}
}
}