[You must know. NET] The nineth time: Taste type---Value type and reference type (medium)-rule boundless

Source: Internet
Author: User

This article describes the following:

Basic concepts of types

Value type in depth

Reference type Depth

Comparison and application of value types and reference types

1. Introduction

Back [eighth: Taste Type---Value type and reference type (upper)-memory rational] release, by the attention of many people, we understand the value type and reference type from the angle of memory, the task left is of course how to apply the different characteristics of the type in the system design, performance optimization and so on to play its role. Therefore, this return is a strong complement to the last, at the same time, in the hope of friends, we try to from the perspective of memory debugging to look at some design analysis, this will help to a thorough and comprehensive understanding of this topic, of course, this is the next point.

It is reasonable to discuss value types and reference types from a memory perspective, and it is boundless to understand value types and reference types from a rule perspective. The purpose of this article is to take this topic from the perspective of the above, to completely integrate the subject, the endless application, or from the capricious practice, so I can only say that the application of an angle to explain the point of view, but certainly impossible to achieve the overall situation. Therefore, we have discussed the application area of value type and reference type from the following angles.

2. General rules and comparisons

Universal has rules:

The string type is a special reference type, and it inherits from System.Object is definitely a reference type, but in the application performance and highlight the characteristics of the value type, then what is the reason? For example, the following paragraph is executed:

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.