Effective C # Third chapter, express your design with C #

Source: Internet
Author: User
Tags class definition

The C # language introduces a new syntax for your design, which you can choose to communicate with other developers who can maintain, extend, or use the software you design. All types of C # are living in. NET environment, this environment makes some good assumptions about all types of compatibility. But if you violate these assumptions, you increase the likelihood that the type will not work correctly.

These principles are not a summary of the software design techniques that have been published, but instead they give a striking picture of how to express the best software design intentions with different C # language features. The designer of the C # language added some language features to make it more explicit about modern software design habits. What is remarkable about the specific language features is subtle, and you often have a lot of options. More choices may be a better solution at first, but then, where the language features are outstanding, you will find it necessary to enhance the existing program. Make sure you have a good understanding of these principles and apply them carefully, and when you create your own systems, pay attention to the opportunities that are most likely to be enhanced (designed).

Some grammatical changes will give you new words to describe some of the habits you use every day. attributes, indexers, events, and proxies are examples. They are different from classes and interfaces: class definition type, interface declaration behavior. The base class declares the type and defines some common behavior for some of the related types that are put together. Because of the garbage collector, other design habits have changed, and there are some changes because most variables are reference types.

The principles recommended in this chapter will help you choose some of the most natural ways to express your design. This will allow you to design software that is easier to maintain, easier to expand, and easier to use.

Back to the Tutorial directory

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.