Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the XML tags of C # documents?

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article introduces the relevant knowledge of "what are the XML tags in C # documents?". In the operation of actual cases, many people will encounter such a dilemma. Next, let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

Introduction of XML tags in C # documents

Indicates that this line of comments is marked as Code

: indicates that the multiline comment is identified as Code

Often used with to give examples of how to use certain members

Indicates which exceptions a member will throw, often used with the cref property

Indicates in which files and where the comments are located

Used to define the header, often used with

Internal use, such as or. Give users the opportunity to add other structures to the comment text.

Describes the properties of the parameter, and the compiler checks the validity of the parameter. If it fails, it will be generated in the document! A warning of the identity.

: similar.

Indicates the security of code access for members

Descriptive text used to describe class or other types, without details (if so, use)

Describes the return value of a method or function

Specify a link

Specifies the text to appear in the See Also section

Descriptive text of the type It will be used by vs.net 's built-in IntelliSense and displayed in the corresponding type. (that is, keystroke in vs.net. " Hint that appears)

Describe the property

Marking and description

Cref: can be used with any tag to provide a reference to a code element. The compiler will check whether this code element exists, and if not, use it in the document! Identification.

Name: for or

Examples of the use of XML tags in C # documents

1. Marking

/ A method with a string array param. / public void Koo (string [] ss) {}

two。 Marking

/ A nonvoid method. / The result of the operation. Public int Noo () {return 0;}

3. Tag and cref attributes:

/ Throws a FileIOException when... / public void Foo () {}

4., and tags

/ Hoo is a method in the Class1 class. / public void Hoo () {} / The Joo method. / This example shows how to use Joo: / public static void Main () / / {/ Console.WriteLine (Class1.Joo ()); / /} / public static int Joo () {return 0;}

5. Tag syntax:

/ / class Class1 {public static void Main () {}} supporting.xml The summary for this type. Another type description.

6. Tag Grammar and its Application

Term description term description / Here is an example of a bulleted list: / / Item 1. / Item 2. / / static void Main (string [] args) {} "C # document XML is marked with This is the end of the content of "which" Thank you for your reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report