1.5 .NET framework class library
The .NET framework includes a set of .NET Frames Library (FCL) assemblies, which contain thousands of types of definitions, each with a function.
CLR and FCL allow developers to create the following applications:
l XML Web Services, XML Web Services, referred to as a web service. This service makes me more easily to make method calls via the Internet.
l Web Forms, Web Forms is an ASP.NET application. He provides a way to develop a Windows program to develop web applications.
l Windows Forms, Windows Forms, Windows Graphical User Interface (GUI) applications.
l Windows Console Application
l Windows service
l component library
All types of FCL can be found through documentation.
1.6 Universal Type System
Types provide applications and components that provide their needs.
The type as a mechanism allows a language written in a language that can be seamlessly integrated with the code written in another language.
The type is the foundation of the CLR. Microsoft specializes in the formal specification for this purpose - a common type system to describe the definitions and behaviors of the type.
The component of the type defined by the CTS:
The field field is a data member belonging to the object status section. Fields are identified by their names and types.
l method method is a function of performing some operations on an object, typically changing the status of the object. The method has a name, signature, and modifier.
l When the property is called, similar to a field, when implementing, similar to the method. Provides how similar ways to use fields are provided.
l Event events allow a notification mechanism to be created between an object and other associated objects.
Members of CTS definitions:
The Private method can only be called by other methods in the same type.
l Family method can be called by code in the derived type, regardless of whether they are in the same program. (Called: protected)
l Family and Assembly method can only be called in the derived type of derived type in the same program. (C # and Visual Basic did not provide this access control.
l Assembly method can be called by any code in the same program set (called: Internal) in C #.
l Family and Assembly methods can be called by the derived type of the derived type in any assembly, or any type of call in the same program. C # is called protected internal.
l Public method can be called by any code in any assembly.
CTS only supports single inheritance
CTS specifies that all types must be (directly or indirect) inherit the self-predefined type System.Object.
1.7 Universal Language Specification
The CLR integrates all programming languages and allows a language created by a language to be seen as the same member in another different language. The standard type collection of CLRs, the information of the type of type (ie, metadata), and the universal execution environment make this integration possible.
Common Language Specification (CLS), a minimum character set must be supported for describing the CLR compiler.
CLS specifies that the various languages under the .NET platform must support the minimum collection of type rules, all .NET platform language must be supported. Of course, each language can support more rules on the CTS. Both C # and Visual Basic must support CLS, but in addition, C # can additionally support some of the characteristics of CTS, and Visual Basic can also directly in some CTSs in CTS. Of course, when you use C # to write components used by Visual Basic, you cannot use Visual Basic not supported on a public interface. Such as:
Public uint32 ABC () This public method returns uint32 Visual Basic does not support. The compiler will report an error.
Of course, when you use Private uint32 ABC (), it is allowed because he is not public.
CLS specifies that each member of the CLR, the type of type or a field, or a method. Enumerations, arrays, attributes, indexers, delegates, events, constructors, destructors, heavy-duty operators, translation operators, etc., which need to be translated into fields or methods at compile Other languages can access them.
1.8 interoperability with non-hosting code
The .NET framework provides a more superior feature than other development platforms, and allows applications to include hosted and unmanaged parts. Specifically, there are three interoperability situations:
l The non-managed function hosting code in the managed code calling DLL can easily use a mechanism called P / Invoke (ie, Platform Invoke, platform calls) to call the DLL (Dynamic Link Library File).
l Managed Codes Use existing COM components (non-hosting components as COM servers) to create managed assemblies. The hosted code can access the types of these managed assembly in the same manner as accessing other managed codes.
l Non-hosting code uses managed types (managed types as COM servers)