C # learning Record (iv)

Source: Internet
Author: User

First review the Polymorphism in C #, and observe the implementation of polymorphism in the compiler through some test classes and functions.

The code is as follows

As an example of Obja in an instance, the compiler begins with Class A, stepping through the subclasses of a to find the function's override until there is no overriding or reaching the type of the object in memory that obja corresponds to.

Use of properties

Attributes are a notable feature of C # that differs from other programming languages, and its implementation facilitates the encapsulation of data. Before I did ASP, attributes were indispensable in the model of the MVC architecture.

This is a common use of attributes

Get set can override the read and write functions that set it

The property is not different from the field when it is used.

Winphone application development attempts because of my computer's vs missing some components and temporarily unable to install, temporarily cannot experiment.

C # learning Record (iv)

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.