zoukankan      html  css  js  c++  java
  • [Tip: C# commenting]Comment in C# for VS

    there are three types of commenting syntax in C#:multiline, single line, and XML.

    XML Documentation Comments
    In addition to providing code commenting, an XML documentation comment supports tools that extract comments into an external XML document. This XML can be consumed
    by tools or run through XSLT style sheets to produce readable documentation. This is what Microsoft uses to document the .NET FCL APIs that you see in the VS2008 help files. 

    The .NET C# compiler has an option that reads the XML documentation comments and generates XML documentation from them. XML documentation is extracted to a separate
    XML file that can then be processed by a tool for creating human-readable documentation.
    Here’s an example of a command line you can use to get the C# compiler to create an XML documentation file from XML documentation comments in a C# source code file:
    csc /doc:ProgramComments.xml Program.cs.

    And you can also tell VS compiler to generate such xml file by project setting: Build -> Output -> XML documentation File.


  • 相关阅读:
    Binary Search Tree Iterator 解答
    Invert Binary Tree 解答
    Min Stack 解答
    Trapping Raining Water 解答
    Candy 解答
    Jump Game II 解答
    Implement Hash Map Using Primitive Types
    Gas Station 解答
    Bucket Sort
    HashMap 专题
  • 原文地址:https://www.cnblogs.com/taoxu0903/p/1670542.html
Copyright © 2011-2022 走看看