Hjr-asp.net:asp.net write. dll library __.net

Source: Internet
Author: User

DLL Creation Invocation Method Doc Comment

DLL

DLL is to encapsulate some common classes, and then import into your project, you can call the methods and properties inside. Create the right key on the solution-> add-> New Project-> class library-> after the creation is complete, the DLL project right key-> regenerate, you can rename

Such a DLL is done, putting the DLL and your Web project into a solution so that you can write it in a DLL-and then call the test directly in the Asp,net project, and the namespace of the DLL is automatically named, Folders and subfolders in namespaces are represented in fordername.fordername form, as are Java packages. Call Mode


First reference: Use Dllname.foldername
Then directly instantiate that class, className objectname = new ClassName (), and then you can use that class, and notice that it's set to public to use through DllName.folderName.className objectname = new DllName.folderName.className (), instantiated class, and then directly use

Note that C # in some asp,net background C # 's function DLL cannot use doc comments

When you have a lot of classes in your DLL, you want to write a help document, and if one writes a large amount of time, it's necessary to have a doc comment on the class, and some software can automatically generate help documents based on Doc annotations.

<summary> write an introduction to the class here </summary>
<param name= "Parname" > here the interpretation of the parameter (Parname is the parameter name passed in) </param>
<returns> here write return value </returns>

If you write a doc annotation directly when you call the method, you can see the mouse hover over the method name, but you need to first

Right-click the Project-> property-> generate->xml document file selected so that the doc annotation document is generated after right-clicking-> rebuild

When you import DLLs, they are imported automatically, and the PDB files that are generated at the same time are temporary files that are generated when you debug, and can be deleted when you publish them.
How to import a DLL:

Right-click Project-> Add Reference-> Browse-> find dll-> OK

Mouse hover can only see the introduction of the class, when you cursor into the parentheses of the method to see the parameters of the introduction, you can also select the method-> go to the definition to view specific comments

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.