C # some basic concepts

Source: Internet
Author: User
Tags reflector

1. CLR-Common Language Runtime provides the Runtime environment for. NET applications. Locates, loads, and manages. NET types, and is also responsible for some underlying details, such as memory management, application domain creation, thread and object context boundaries, and security checks. 2. CTS-Common Type System fully describes all possible data types and programming structures supported by the Runtime Library, specifies how these entities interact, and also specifies that they are in.. NET metadata format. CTS includes five basic types: class, interface, enum, delegate and struct CTS possible members: constructor, Terminator, static constructor, nested type, operator, method, attribute, indexer, field, read-only field, constant, event 3. CLS-Common Language Specification defines one for all.. NET supports a subset of common types and programming structures. This is a subset of all language features, while CTS is a collection of all language features. CLS defines a set of rules. When the program fully complies with this set of rules, you can ensure that your program can be correctly called by all other. NET languages. You can use the [assembly: System. CLSCompliant (true)] feature to verify CLS rules. 4. A set of public Class libraries that can be called by all. NET languages in the BCL-Basic Class Library encapsulates many of the most Basic types and services. 5. The code of Managed/Unmanaged code running in CLR is called managed code, and vice versa. 6. C # advantages of Automatic Management of memory without Pointers-garbage collection mechanism object-oriented language operator overloading support Attribute generic programming more secure anonymous functions support simplified Delegate/event model partial class3.5 support features: the extension method is supported for the LINQ anonymous type to extend the existing Lambda syntax. The new initialization object syntax is 7. IL, pencil, or MSIL intermediate language, or become a common intermediate language. All. NET language codes are converted into intermediate languages after compilation. The objective is to support multiple languages. 8. The Assembly content mainly includes the compiled IL instruction set, metadata type, and manifest (metadata of the Assembly itself ). Metadata is mainly used for reflection, Object serialization, late binding, and intelligent perception of wcf and. In addition to recording the version and module number of the current Assembly, manifest also records information about the external assembly that allows the Assembly to run normally. 9. JIT-just in time instant compiler. Running a program is to compile the IL command, generate a machine code that can be recognized by the machine, and save the compilation result. The next time you call the same code, you do not need to re-compile it. 10. namespace is simply a grouping mechanism for. NET types. The most common System namespaces include System. Data, System. IO, and so on. In addition to the System headers namespace, the most useful namespace starts with Microsoft. The types contained in the namespace are generally related to Microsoft operating System services and cannot run on other operating systems, such as MAC and Linux. 11. Check the IL and decompile the. NET built-in tool ildasm to view the Assembly IL. Use reflector to decompile the Assembly. You can download it from http://www.red-gate.com/products/reflector. 12. NET is a cross-language platform. NET also supports cross-platform languages. A cross-Language Platform supports multiple programming languages. In theory, a cross-platform language is supported. NET can run on a non-Windows OS. However, for the latter, MS itself did not do this, and only two open-source architectures are providing limited support:

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.