How to make a DLL dynamic library file generated by C #, with comment notes prompt when referenced

Source: Internet
Author: User

How to make a DLL dynamic library file generated by C #, with comment notes prompt when referenced

1, the format of the annotation to be standardized, all the comments should be used in the following image of the standard format (three on the member write the "/" will be automatically generated):

2, the annotation information output to the XML file, change the project output attributes, tick 〈xml documentation file〉 can be, the following figure:


3, the final step, to ensure that the DLL is referenced, the output of the XML file also and the DLL under the same reference directory.



from:https://blog.csdn.net/aaa123524457/article/details/50419085


When you start using a DLL, there's always the question of why the DLL you build doesn't have a comment. NET type is how to get the comments. It was later realized that adding annotations to the class that was preparing to build the DLL was a particular and well-formed one.
For a generated DLL to have comments when viewed from metadata, you must first check the XML document file on the output option in the Build column in the project properties.

Then, when you add a comment to the class, it appears automatically after you knock three '/' on the class, method, property, and so on: [CSharp] View plain copy///<summary>///max of two/// mary>///<param name= "a" ></param>///<param name= "B" ></param>///<returns>max<   ;/returns> public static int Getmax (int a, int b) {return (a > b a:b); }

<summary>///test function///</summary>///<param name= "obj1" > Parameters 1</param>///<param name= "Obj2 "> Parameter 2</param>///<returns> return value </returns> public int Testfun (object obj1, Object Obj2) {RE Turn 1; }


You can see that the annotation is in XML format, after the annotation is "generated" again, you will find an extra XML file with the same name as the DLL file in the same directory, which is the XML annotation extracted from the assembly.
When you view the definition from the metadata later, you will notice that there are more annotations on it.



from:https://blog.csdn.net/helloword4217/article/details/8953948



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.