Ý con kiến phản hồi sẽ được gửi mang đến baoveangiang.com: bằng phương pháp nhấn nút gửi, ý kiến phản hồi của các bạn sẽ được thực hiện để nâng cấp các sản phẩm và dịch vụ của baoveangiang.com. Cơ chế về quyền riêng biệt tư.
Bạn đang xem: Insert xml documentation comments
Trong nội dung bài viết này
Visual Studio can help you document code elements such as classes và methods, by automatically generating the standard XML documentation phản hồi structure. At compile time, you can generate an XML file that contains the documentation comments. To enable that option, select Generate a tệp tin containing API documentation on the Build > Output tab of your project"s properties.
Tip
If you want khổng lồ configure a non-default name và location for the documentation file, add the DocumentationFile property lớn your .csproj, .vbproj, or .fsproj file.
The compiler-generated XML tệp tin can be distributed alongside your .NET assembly so that Visual Studio and other IDEs can use IntelliSense lớn show quick information about types and members. Additionally, the XML tệp tin can be run through tools lượt thích DocFX and Sandcastle to generate API reference websites.
Note
The Insert Comment command that automatically inserts XML documentation comments is available in C# and Visual Basic. However, you can manually insert XML documentation comments in C++ files & still generate XML documentation files at compile time.
Xem thêm: Xem Phim Trái Tim Trong Sáng Tập 1, Xem Phim Trái Tim Trong Sáng
To insert XML comments for a code element
Place your text cursor above the element you want khổng lồ document, for example, a method.
Do one of the following:
Type /// in C#, or """ in Visual Basic
From the Edit menu, choose IntelliSense > Insert Comment
From the right-click or context thực đơn on or just above the code element, choose Snippet > Insert Comment
The XML template is immediately generated above the code element. For example, when commenting a method, it generates the element, a element for each parameter, & a element to lớn document the return value.
Enter descriptions for each XML element khổng lồ fully document the code element.
You can use styles in XML comments that will render in Quick Info when hovering over the element. These styles include: italics, bold, bullets, và a clickable link.
Note
There is an option lớn toggle XML documentation comments after typing /// in C# or """ Visual Basic. From the thực đơn bar, choose Tools > Options to xuất hiện the Options dialog box. Then, navigate to Text Editor > C# or Basic > Advanced. In the Editor Help section, look for the Generate XML documentation comments option.
See also
Phản hồi
Gửi cùng xem chủ ý phản hồi dành riêng cho
sản phẩm này Trang này
Xem toàn bộ ý kiến phản hồi về trang
Chủ đề
SángTốiĐộ tương làm phản cao
© baoveangiang.com 2021
Trong bài viết này
Chủ đề
SángTốiĐộ tương bội nghịch cao
© baoveangiang.com 2021