C # Assembly Learning essay (Supplemental version, with image) _ ax

Source: Internet
Author: User
I always thought I was a talented person. I only know it today. I am a genius! The following problem is solved.

In the previous article, I spoke about my initial knowledge of assembly.
Now let's talk about how to use the existing assembly.
For example, when I am working on a solution, I find that the class methods (functions) in a project of the solution you are working on can be used. Ha, then I don't need to write classes, pass the test directly,Not TestCodeFile, but the assembly of the project to be tested... I will solve this problem now.

Process]
① Open the solution, right-click the project in Solution Explorer, and choose add reference. The add reference dialog box is displayed, and click browse ], find and select the Assembly just copied from you, (assume: classlibrary_ax) → [open] → [OK]
Now, you can use your class !!!!!

② Of course, do not forget the reference: Using classlibrary_ax;
OK !!!! Use the classes in assembly as much as possible.

For example:

③ For cainiao, it may still be unclear about the classes contained in Assembly. Please follow the instructions

④ For the functional explanations of the methods in these classes, you will see them when using them. See
Sorry, I didn't write the corresponding comments when writing the method, and I couldn't see what the method is for. Of course, you can see that it is a method for calculating the prize, the return value is a double type.
It can be seen that writing code without comments is not feasible. unreadable code is garbage.

Append: ide automatically copies the assembly to the debug folder of your current project.

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.