[CLR via C #] 1.6Framework class library ~ 1.9 interoperability with unmanaged code

Source: Internet
Author: User

1.6 Framework class library

1.. NET Framework contains the Framework Class Library (FCL ).

2. FCL is a group of DLL assembly, which contains thousands of Type Definitions. Each type discloses some functions. 1.7 General Type System 1. CLR is fully structured around the type. 2. functions are public for applications and other types. Through the type, the code written in one programming language can communicate with the code written in another language. 3. because the Type is the basis of CLR, all MicroSoft statements define a formal specification, that is, the Common Type System (CTS), which describes the definition and behavior of the Type. 4. CTS stipulates that a type can contain one or more members. For example, fields, methods, attributes, and events. 5. CTS also specifies type Visibility rules and type member access rules. Such as privae, family (C #: protected), family and assembly (C #: None), assembly (C #: internal), family or assembly (C #: protected internal) public6. CTS specifies that all types must begin with the predefined System. object type inheritance. 1.8 Common Language Specification 1. MicroSoft defines a Common Language Specification (CLS), which defines in detail a minimum set of functions. To be compatible with other "CLS-compliant, CLS-oriented languages", any compiler-generated type must support this minimal feature set. 2. CLS defines a minimum set of functions that must be supported by all languages. 1.9 interoperability with unmanaged code 1. CLR provides some mechanisms that allow both hosted and unmanaged code to be included in an application. Specifically, CLR supports three types of interoperability scenarios. 1) The managed code can call the DLL-China-Russia unmanaged functions. Managed code uses a mechanism called P/Invoke (Platform Invoke) to call functions contained in the DLL. 2) managed code can use existing COM components (servers ). 3) The managed type (server) can be used for unmanaged code ).

 

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.