C # and. NE Study Day 12th

Source: Internet
Author: User

1. Absolute path and relative path
Absolute path: This file can be found directly on my computer by the given path.
Relative path: The path of the file relative to the application.
Conclusion:
We should try to use relative paths in development.


2. Packing, unpacking
Boxing: Converts a value type to a reference type.
Unboxing: Converts a reference type to a value type.
Look at whether the two types have occurred boxing or unpacking, to see whether there is an inheritance relationship between the two types.


3, the process of creating a file stream object is written in the using, it will automatically help us to release the resources occupied by the stream.

4, the means of realizing polymorphism
1), virtual method
Steps:
1, the method of the parent class is marked as a virtual method, using the keyword virtual, this function can be the quilt class to write again.


2), abstract class
When a method in the parent class does not know how to implement it, consider writing the parent class as an abstract class and writing the method as an abstract method.

C # and. NE Study Day 12th

Related Article

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.