120 days of 1200 hours of pass-through for junior students. NET (i)

Source: Internet
Author: User

The. NET Framework includes the class library and the CLR (the common language runtime). The C # language is translated by the CSC (compiler) into MSIL (intermediate language), which is generated by the CLR in the machine language.

The IDE refers to the development tool that you are using and includes its version.

Classes mainly include fields, properties, methods, events, and so on. fields are used to store data, properties protect fields, values perform get, assignments perform set, such as the immutability of strings, strings can be assumed to be character arrays,

However, it is not possible to change the value of the string by the index of the character array, and by F12 go to the definition to see the property, only get, and no set, so the property protects the immutable string, but can traverse the string to the character array.

The value of the value type is in the stack, the value of the reference type is in the heap, the address is in the stack, so when you write a function that modifies the array value, the return value is not required because the address is passed. The custom class in the project is also a reference type, and the object exists in the heap.

Class is not memory, the object is memory; New does three things: open up space in memory, create objects in open controls, call the object's constructors.

Constructors are used to initialize an object, and to initialize an object is to assign a value to each property of the object.

Static methods must be called with the class name, for example, convert. (method) string. IsNullOrEmpty () Static methods cannot be instantiated by using the Anti-compilation tool to see convert is abstract, abstract classes prohibit instantiation.

Static methods do not have to be written in static classes.

Writing a bunch of members into a class is called encapsulation.

When designing a class, there are many common members, code redundancy, where these common code is encapsulated separately with the new class, which is called inheritance as the parent class of the other classes.

By debugging, a subclass does not inherit the constructor of the parent class, but instead automatically calls the parent class's constructor, which creates the parent class object and initializes the data to access the non-static members.

This represents the current class object, and base is not a parent class object, but a reference to the parent class to access the parent class. Subclasses inherit the properties and methods of the parent class.

Determines whether the same object is the same: objects. ReferenceEquals (P1,P2);

120 days of 1200 hours of pass-through for junior students. NET (i)

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.