• Application types. Microsoft.NET platform. Overview of the architecture and capabilities of the Net framework essence main purpose components advantages

    The set of means by which programs are written, corrected, converted into machine codes, debugged and launched is called development environment or shell. Platform.Net or .Net Framework- it's more than just development environment programs, this is a new revolutionary combination of previously separate technologies by Microsoft, which allows you to develop different types of applications in different programming languages ​​for different operating systems.

    NET Framework is an add-on to the operating system, which can be any version of Windows, Unix, and any OS in general (according to the developers), and consists of a number of components. So, . NET Framework includes:

    1. Four official languages: C#, VB.NET, Managed C++ and JScript .NET.
    2. The Common Language Runtime (CLR), an object-oriented runtime environment that these languages ​​share to create applications.
    3. A series of interconnected class libraries under the common name FCL (Framework Class Library).

    The main component of the platform. NET Framework is a common language runtime environment for CLR programs. The name of the environment - "common language runtime" - speaks for itself: it is a runtime environment that is suitable for various programming languages. CLR functions include:

    1. two-step compilation: converting a program written in one of the programming languages ​​into managed code in intermediate language ( Microsoft Intermediate Language, MSIL, or just IL), and then converting the IL code into machine code of a specific processor, which is executed using a virtual machine or a Just In Time compiler (compiling just in time);
    2. code management: loading and executing ready-made IL code using a JIT compiler;
    3. accessing metadata for verification purposes code security;
    4. memory management when placing objects using the Garbage Collector;
    5. handling exceptions and exceptional situations, including cross-language exceptions;
    6. implementing interaction between managed code (code written for CLR) and unmanaged code;
    7. support for services for developing various types of applications.

    The next component. Net Framework is an FCL - Platform Class Library. This library is divided into several modules in such a way that it is possible to use one or another part of it depending on the required results. So, for example, one of the modules contains the “bricks” from which you can build Windows applications, the other contains the “bricks” necessary for organizing work on the network, etc.

    Part of the FCL is devoted to describing basic types. A type is a way to represent data; identifying the most fundamental ones makes it easier to share programming languages ​​with help. NET Framework. Collectively this is called the Common Type System (CTS - unified type system).

    In addition, the FCL library includes the Common Language Specification (CLS - common language specification), which establishes: the basic rules of language integration. The CLS specification defines the minimum requirements for a platform language. NET. Compilers that meet this specification produce objects that can interact with each other. Therefore, any CLS-compliant language can use all the features of the FCL library.

    As already noted, the main languages ​​intended for the platform. NET Framework are C#, VB. NET, Managed C++ and JScript. NET. For these languages, Microsoft offers its own compilers that translate the program into IL code, which is executed by the CLR JIT compiler. Besides Microsoft, several other companies and academic organizations have created their own compilers that generate code that runs in the CLR. Currently, compilers are known for Pascal, Cobol, Lisp, Perl, Prolog, etc. This means that you can write a program, for example, in Pascal, and then, using the appropriate compiler, create managed code that will run in the CLR.

    Concepts of application, project, solution

    NET Framework does not impose any restrictions on the types of applications that can be created. That said, let's take a look at some of the most common application types:

    1. Console applications allow you to output to the "console", that is, to a shell window.
    2. Windows applications that use Windows interface elements, including forms, buttons, checkboxes, etc.
    3. Web applications are web pages that can be viewed by any web browser.
    4. Web services are distributed applications that allow you to exchange virtually any data over the Internet using a single syntax, regardless of what programming language was used to create the web service or on what system it is hosted.

    An application under development is called a project. Several applications can be combined into a solution.

    A convenient application development environment is Visual Studio .Net.

    Visual Studio .Net development environment

    In this course we will learn the C# language. Let's start getting acquainted with the language by developing console applications. We will use Visual Studio as our development environment. Net (VS).

    You can create C# source code files using a regular text editor such as Notepad and compile them to managed modules using the command line compiler that is included. NET Framework. However, it is most convenient to use VS for these purposes because:

    1. VS automatically performs all the steps required to compile the source code.
    2. The VS text editor is configured to work with languages ​​that VS supports, such as C#, so it can intelligently detect errors and prompt you as you type to find exactly what code is needed.
    3. VS includes programs that let you create Windows and Web applications using simple drag-and-drop user interface elements.
    4. Many types of projects that can be created in C# can be developed based on "skeleton" code that is included in the program in advance. Instead of starting from scratch each time, VS allows you to use existing source code files, which reduces the time required to create a project.

    Creating the first project

    To create a project, launch VS, and then select the command from the VS main menu File – New - Project. Then a dialog menu will open New Project(see Fig. 1.1).


    Rice. 1.1.

    In the field Project types should choose Visual C#, in the field TemplatesConsole Application.

    In the line Name enter the application name Hello. Note that the same name will appear in the line Solution Name. Uncheck the box Create directory for Application(as long as we are creating a simple application, we do not need to complicate its structure).

    In line Location determine the location on the disk where you want to save your project. And press the button OK. An approximate screen view is shown in Fig. 1.2


    Rice. 1.2.

    In the upper right part there is a project management window Solution Explorer View - Solution Explorer. This window lists all the resources included in the project:

    1. AssemblyInfo.cs – information about assembly.

      As a result of its execution, the compiler creates a so-called assembly– a file with an exe or dll extension that contains IL code and metadata.

    2. System, System.Data, System.Xml – links to standard libraries.
    3. Program.cs - program text in C# language.

    Comment. In other versions of VS, this also includes a file with the ico extension, which is responsible for the appearance of the application shortcut.

    At the bottom right of the screen there is a properties window. Properties. If it is closed, then you can enable it with the command View - Properties. This window displays the most important characteristics of the selected element.

    The main screen space is occupied by the editor window, which contains the program text created automatically by the environment. The text is a framework into which the programmer will add the necessary code. In this case, reserved words are displayed in blue, comments in green, and main text in black.

    The text is structured. Clicking on the minus sign will hide the code block; clicking on the plus sign will open it.

    Let's open the folder containing the project and look at its structure (see Fig. 1.3). Files in bold will only appear after compilation.


    Rice. 1.3.

    At this stage, the following files will be of particular interest to us:

    1. Hello.sln– the main file responsible for the entire project. If you need to open a project for editing, you need to select this file. The remaining files will open automatically.
    2. Program.cs– a file that contains source code - code written in C#. It is this file that we will work directly with.
    3. Hello.exe– a file containing the generated IL code and project metadata. In other words, this file is a ready-made application that can be executed on any computer on which the .Net platform is installed.

    Now let's look at the program text itself.

    using System is a directive that allows the use of standard class names from the namespace System directly without specifying the name of the space in which they were defined.

    Keyword namespace creates its own namespace for the project, which by default is called the project name. In our case, the namespace is called Hello. However, the programmer has the right to specify a different name. A namespace limits the scope of a name, making it meaningful only within that space. This is done so that you can give names to program objects without worrying that they will match names in other applications. Thus, namespaces allow you to avoid conflicting names of software objects, which is especially important when applications interact.

    C# is an object-oriented language, so a program written in it will be a collection of classes interacting with each other. A class named Program was automatically created (other versions of the framework may create a class named Class1 ).

    This class contains only one method - the Main() method. The Main() method is the entry point to the program, i.e. It is with this method that the application will begin execution. Every C# program must have a Main() method.

    Comment It is technically possible to have multiple Main() methods in one program, in which case you would need to use a command line parameter to tell the C# compiler which Main() method is the entry point to the program.

    Debug-Start Debugging If the program is executed without errors, a message will be displayed in the console window, which will flash and quickly close. To view the message in normal mode, press Ctrl+F5 or run the command Debug-Start Without Debugging.In our case, the following console window will open:

    If the program code contains errors, for example, a semicolon is missing after the output command, then after pressing the F5 key, a dialog box will open in which a message will be displayed stating that an error has been detected and a question whether to continue working further. If you answer Yes, then the previous successfully compiled version of the program will be executed. Otherwise, the process will be stopped and control will be transferred to the error list window Error List.

    Exercise. Change the text of the code so that the message is displayed on the screen: Hurray!!!Today computer science!!!

    One of the main principles of .NET can be expressed as follows: "Change whatever you want, using any means." The .NET platform is a completely new model for creating Windows applications. Let us briefly list the main provisions of .NET.

    • All possibilities of interaction with existing code. COM binaries work well with .NET binaries.
    • Complete and absolute interlingual interaction. Unlike classic COM, .NET supports cross-language inheritance, cross-language exception handling, and cross-language debugging.
    • A common runtime environment for any .NET application, no matter what language it was written in. And what's important is that all languages ​​use the same set of built-in data types.
    • A base class library that hides all the complexities associated with using API calls and provides a complete object model for all programming languages ​​that support .NET.
    • You can forget about the intricate COM structures! Interfaces IClassFactory, IUnknown, IDL code, and variant data types are not available in .NET programs.
    • Truly simplifying the application deployment process. In .NET, you do not need to register types in the registry. Moreover, .NET allows different versions of the same DLL module to coexist peacefully on the same computer.

    Advantages

    1. The entire .NET platform is based on a single object-oriented model. What does it mean? The fact is that all the services, interfaces and objects that the platform provides to the developer are combined into a single class hierarchy. In other words, everything you might need when creating applications for the .NET platform will always be at your fingertips. Moreover, all this is grouped very conveniently and intuitively.
    2. An application written in any .NET-compatible language is cross-platform (ideally). Why ideal? The fact is that an application written, say, in C#, does not depend on the platform on which it will be executed, but depends on the availability of the .NET platform. But you must admit that it is much easier to port the .NET architecture to any system once, and then run absolutely any .NET application without any problems. But at the moment, the .NET platform has been ported only to the Windows family of operating systems, including MS Windows mobile systems.
    3. The .NET platform includes the so-called. a "garbage collector" that frees resources. This way, applications are protected from memory leaks and the need to free resources. This makes programming easier and safer.
    4. .NET applications use metadata, which allows them to bypass the Windows registry.
    5. Any .NET application is autonomous, in the sense that it does not depend on other programs, in particular on the OS. Installing an application written in one of the .NET languages ​​can be done by simply copying files (with the exception of creating shortcuts in Start and other places).
    6. .NET applications use safe types, which improves their reliability, compatibility, and cross-platform functionality.
    7. An application written in any .NET language interacts with a single error handling model, which greatly simplifies this tedious process.
    8. Applications written in different languages ​​can easily interact. For example, the server part can be written in C#, and the client part in Visual Basic.
    9. .NET applications can be certified for security. This is a feature of the intermediate code into which all .NET applications are converted.
    10. Absolutely all errors are processed by the exception mechanism. This avoids the friction that sometimes arose when programming under Win32.
    11. Code reuse has become even more convenient. This is because the intermediate language MSIL is independent of the programming language. For example, you can write a program in C#, and write a patch for it in, say, J#.

    Flaws

    Any software product has its drawbacks, and so does the .NET platform. You need to know them too.

    1. As is often the case, convenience comes at the cost of speed, and that’s what happened with .NET. Applications written for the .NET platform are slower, that's a fact. In some cases, the speed may drop by 15%, which is sometimes unacceptable (for example, when creating 3D applications where they fight for every FPS). Delays in execution are associated with the MSIL intermediate language, because compiling it into an executable file also takes time. Of course, the application is not compiled all at once, but in parts, evenly as the program runs.
    2. Not every language can create .NET applications. The fact is that initially .NET was “tailored” for C/JAVA-like languages. This has created some difficulties in creating .NET compilers for other languages ​​(especially exotic and highly specialized ones). As a result, some functions had to be solved in non-trivial ways, which had a negative impact on performance. But gradually this disadvantage disappears, because Compiler developers have realized the importance of the .NET platform and are trying to make decent tools for their languages.
    3. The FrameWork library is required. This drawback was eliminated with the release of Windows Vista, because This library is built into the system by default.

    You can pay attention to the fact that .NET has more advantages than disadvantages. Of course, this is not a reflection of reality. This indicates a good marketing campaign carried out by Microsoft.

    C#
  • Common Language Runtime) and a class library...
  • The .NET Framework and the CTS Specification
    The C# language and its support are currently associated with the .NET Framework developed by Microsoft. The named platform (see) includes: common language runtime (CLR - Common Language Runtime Framework Class Library). It should be noted...
    (PROGRAMMING. BASIC COURSE C#)
  • Installing the .NET Framework and Visual Studio
    In Windows 7 and 8, the .NET platform is already available and there is no need to install anything. To develop applications in the .NET platform, you need to install the Visual development system C# 2012 (or 2013) Express Edition - a free version of the Visual Studio development environment (shorter, but with almost...
    (Object-oriented programming)
  • C# TYPES AND .NET FRAMEWORK TYPES
    The C# language and its support are currently associated with the .NET Framework developed by Microsoft. The named platform (see) includes: common language runtime (CLR - Common Language Runtime) and a class library...
    (PROGRAMMING. BASIC COURSE C#)
  • The .NET Framework and the CTS Specification
    The C# language and its support are currently associated with the .NET Framework developed by Microsoft. The named platform (see) includes: common language runtime (CLR - Common Language Runtime) and class library (FCL - Framework Class Library). It should be noted...
    (PROGRAMMING. BASIC COURSE C#)
  • NET Framework serves as an environment for supporting, developing, and running distributed applications that are based on components (controls).

    Applications (programs) can be developed in different programming languages ​​that support this technology.

    NET Framework provides:

    • joint use of different programming languages;
    • security and portability of programs;
    • general programming model based on the Windows platform.

    2. What are the main components of the .NET Framework?

    From a programming point of view, the .NET Framework consists of two main components:

    • common language execution environment CLR (Common Language Runtime);
    • base class library.

    The common language runtime (CLR) solves the problems of automatically discovering, loading, and managing .NET types. The CLR handles memory management, application maintenance, thread processing, and implements numerous security-related checks.

    The library of base classes includes the definition of various primitives, which can be: streams, graphical APIs, database implementations, file I/O, etc.

    3. What is the operating principle of the Common Language Runtime (CLR)?

    The common language runtime (CLR) manages the execution of .NET code.

    After compiling a program in C# (or another language), a file is created that contains a special kind of pseudocode or bytecode (and not an executable file, as it was before). This pseudocode is called (MSIL) or Common Intermediate Language (CIL). This pseudocode is Microsoft Intermediate Language.

    The main purpose of the CLR is to turn intermediate MSIL code into executable code during program execution.

    Any program that is compiled to MSIL pseudocode can be executed in any environment that contains an implementation of the CLR. This allows programs to be portable within the .NET Framework.

    Rice. 1. The process of converting source code into MSIL (CIL or IL) code and creating an assembly file (*.dll or *.exe)

    After this, the pseudocode turns into executable code. This is done by the JIT compiler. JIT (Just-in-time) compilation is compilation on the fly.

    The CLR is responsible for determining where to place the assembly.

    The requested type that is placed in the assembly (such as an ArrayList class or other type) is determined in the binary file (*.dll or *.exe) by reading the file's metadata.

    The CLR then places the type read from the assembly into memory.

    The CLR then turns the CIL code into appropriate instructions that are tailored to the specific platform (depending on the PC, operating system, etc.). In addition, the necessary safety checks take place at this stage.

    The last thing to do is execute the requested program code.

    4. What is MSIL intermediate language ( Microsoft Intermediate Language) or CIL (Common Intermediate Language)?

    At first, the intermediate pseudocode language was called Microsoft Intermediate Language(MSIL). Later (in the latest versions of .NET) this name was changed to Common Intermediate Language (CIL - Common Intermediate Language). The abbreviations MSIL, CIL and IL (Intermediate Language) mean the same thing.

    Intermediate language CIL (or MSIL) is formed after compiling a program in some programming language that supports the .NET Framework.

    MSIL is pseudocode. MSIL defines a set of instructions that:

    • can be transferred to different platforms;
    • do not depend on a specific processor.

    In fact, MSIL is portable assembly language

    5. What is an assembly from the point of view of .NET technology?

    Assemblies are files with *.dll or *.exe extensions that contain .NET platform-independent Intermediate Language (IL) instructions as well as type metadata.

    The assembly is created using the .NET compiler. An assembly is a large binary object.

    The assembly is designed to preserve namespaces. Namespaces contain types. Types can be classes, delegates, interfaces, enumerations, structures.

    An assembly can contain any number of namespaces. Any namespace can contain any number of types (classes, interfaces, structures, enumerations, delegates).

    6. What is included in assemblies?

    Assemblies contain CIL code (MSIL code or IL code) and metadata.

    CIL code is compiled for a specific platform only if it is accessed from the .NET runtime.

    Metadata describes in detail the features of each type that exists within a given .NET binary unit.

    For example When you create a Windows Forms Application in C#, an Assembly.info file is created. This file is located in the Properties subfolder relative to the main program folder. This file provides general information about the assembly.

    7. What is a manifest?

    Manifesto is a description of the assembly itself using metadata.

    The manifest contains the following information:

    • about the current version of the assembly;
    • information about culture (localization of line and graphic resources);
    • a list of links to all external assemblies that are needed for proper functioning.

    8. Diagram of the interaction between source code, the .NET compiler, and the .NET runtime engine.

    The programmer creates the source code of the application in a language that supports .NET technology (C#, C++/CLI, Visual Basic .NET, etc.). The application is created in some programming environment, such as Microsoft Visual Studio. The compiler generates an assembly - a file that contains CIL instructions, metadata and a manifest.

    After running this application on a certain computer (certain platform), the .NET runtime engine is launched. First, one of the versions (at least) of the .NET Framework must be installed on the computer.

    If the source code uses base class libraries (for example, from the mscorlib.dll assembly), then they are loaded using the class loader.

    The JIT compiler compiles the assembly taking into account (linking) the hardware and software features of the computer on which the application is running.

    After this, the application runs.

    Figure 2. Relationship between source code, compiler, and .NET runtime engine

    9. What types of assemblies are there?

    There are two types of assemblies:

    • single-file assemblies;
    • multi-file assemblies.

    An assembly that consists of one single module (*.dll or *.exe) is called single-file. Single-file assemblies place all the necessary CIL instructions, metadata, and manifests in one, well-defined package.

    An assembly that consists of many .NET binary code files is called a multi-file assembly. Each of these files is called a module.

    In a multi-file assembly, one of the modules is the main one (primary).

    10. Which file contains the main assembly of the MS Visual Studio library?

    The main assembly is located in the file “mscorlib.dll”.

    11. What is the general CTS type system?

    CTS (Common Type System) - a type system that contains a complete description of all possible data types and program constructs that are supported by the common language runtime CLR. It also describes how these entities can interact with each other.

    Types can be classes, interfaces, structures, enumerations, delegates.

    12. What is the purpose of the Common Language Specification CLS?

    As you know, not all programming languages ​​that are .NET compatible can support the functionality of the CTS type system. For this purpose, the common language specification CLS (Common Language Specification) is used.

    The purpose of CLS is to describe only that subset of common types and programming constructs that are accepted by absolutely all programming languages ​​that support .NET.

    13. What programming languages ​​support .NET technology?

    In the MS Visual Studio application development system, .NET technology is supported by the following programming languages: C#, Visual Basic .NET, C++/CLI, JScript .NET, F#, J#.

    In order to be able to use .NET technology, you need to install software on your computer Microsoft .NET Framework Software Development Kit(SDK) or Microsoft Visual Studio of any version.

    14. What is a namespace?

    A namespace is intended to unite a group of types that are related to each other from a semantic point of view. Types are placed in assemblies (assembly). Types mean classes, delegates, interfaces, structures, and enumerations.

    Examples of namespace names:

    System System.Data System.IO System.Collections System.Threading.Tasks

    For example, the System.Data namespace contains the main types for working with databases, and the System.Collections namespace contains the main types for working with collections.

    15. How to display the contents of assemblies, namespaces and types in MS Visual Studio?

    The Microsoft Visual Studio system has a utility Object Browser, which is called from the View menu (Figure 3).

    Rice. 3. Calling the Object Browser utility

    This will open the Object Browser window, which will display the assemblies that are used in a particular technology.

    Figure 4 shows a list of assemblies that are displayed in the “.NET Framework 4” technology. An assembly named “mscorlib” is highlighted.

    Rice. 4. Object Browser window with the mscorlib.dll assembly highlighted

    If you expand the contents of the mscorlib assembly (the “ + "), a list of all namespaces for this assembly will be displayed (Figure 5). As you can see from the figure, the assembly includes the namespaces Microsoft.Win32, System, System.Collections, System.Collections.Concurrent, and many others.

    Rice. 5. The mscorlib assembly and the list of namespaces that are included in it

    Any of the namespaces is expanded in the same way. Namespaces describe types. Types describe methods, properties, constants, etc.

    Figure 6 shows the BinaryReader class from the System.IO namespace. Apparently, the class implements methods named BinaryReader(), Close(), Dispose(), FillBuffer() and others.

    Rice. 6. Contents of the BinaryReader class

    16. How to connect a namespace in a C# program?

    To connect a namespace, use the using keyword

    Annotation: Microsoft .NET Initiative. Compatibility, reliability and component reuse issues. .NET Framework. Common Language Runtime Environment (CLR). Pseudo-machine language CIL (controlled by assembler). JIT compiler. Programming languages. Assemblies. Metadata. Garbage collector. .NET Framework Class Library

    Problems of developing modern information systems

    Integration problems

    • Modules written in different languages, using different APIs (or API versions) or different data representation formats;
    • Programs developed for various platforms within a single software package;
    • Systems using different software models.

    Integration problems with legacy code are especially common. When solving integration problems, incompatibility problems arise.

    Portability issues

    Increasingly, programs are required to support multiple platforms (for example, the ability to work with the program on the Windows and Mac OS platforms).

    Version issues

    Windows developers are aware of a version compatibility problem known as DLL hell. This "hell" occurs when components installed for a new application replace components of the old application. As a result, the old application starts to work incorrectly or stops working.

    Resource Management

    One of the challenges of programming is the management and correct release of resources, files, memory, screen space, network connections, database resources, etc. Incorrect management of these resources can lead to incorrect execution of the program.

    Type safety

    When they mention a type safety problem, they mean incorrect handling of data types: attempts to access memory areas outside the boundary of the type, attempts to call methods that are not present on the type, or attempts to call a method that takes type A as a parameter and pass it as a parameter object type B.

    Failure Handling

    When developing Windows applications using the Win32 API, some functions return exceptions, others return status codes, and others return HRESULTs. Thus, there is no consistent mechanism for handling failures and it is possible to ignore some exceptions, which makes the code unsafe.

    The Microsoft .NET platform helps solve these and other information system development problems.

    Solving problems of developing information systems in .NET

    One way to solve the problem of heterogeneity is to develop and support standard software interfaces that facilitate the task of transferring applications to servers of various platforms. However, applications may use databases, communications, and other services whose interfaces are not components of the programming language or environment. Another method used by manufacturers to solve the problem of heterogeneity is to support standard protocols. Systems supporting the same protocol can communicate with each other, even if they rely on different machine architectures and operating systems.

    Technology. NET is a software development and deployment method that uses widely used standards such as HTTP and XML to enable program interoperability and provide access to numerous software services over the Internet. Technology includes. NET Framework is a platform for developing and executing applications that simplifies and speeds up development, supports full object-oriented programming for the Web, eliminates many types of the most common software errors, provides a common API for all languages.

    What makes up Microsoft .NET

    NET Framework - application development infrastructure. Its main components are the Common Language Runtime and a class library. NET Framework Class Library.

    Common Language Runtime

    Common Language Runtime (CLR) is a common language runtime that abstracts operating system services and runs managed applications, any action of which must be authorized by the CLR.

    All code for the .NET platform is converted by the CLR to CIL intermediate code. Therefore, developers can easily integrate code written for .NET in various programming languages. Anything that can be done in one .NET-compatible language (with rare exceptions) can be done in any other. Code in these languages ​​is compiled into code in one language - CIL.

    The CLR sits on top of the operating system and provides a virtual environment for managed applications. Code for the .NET platform is either executed by the CLR or is allowed to be executed outside of it.

    The code for the CLR is in the form of Common Intermediate Language (CIL) pseudo-machine language commands. These instructions are compiled into machine code for the appropriate processor type on a just-in-time basis at runtime. Typically, a method is compiled once, the first time it is called. The result is then cached in memory to avoid delays in repeated calls. The JIT compiler optimizes code specifically for the processor on which the code is executed.

    By converting CIL instructions into processor instructions, the JIT compiler verifies the code for type safety.

    It is virtually impossible to execute a command that accesses an area of ​​memory that the command does not have permission to access. A managed application eliminates the problem of misinitialized pointers by preventing a type from being converted to something it is not, which is a type safety violation. The CLR does not allow methods to be called with a destroyed stack frame.

    Resources allocated by managed code are freed by the garbage collector. In other words, the programmer only allocates memory, but does not free it - the CLR does this. The garbage collector keeps track of all references to objects created by a program and destroys those objects when the memory they occupy is needed elsewhere. This resolves the problem of memory leaks in managed code applications.

    Code verification is also the basis of the CLR's ability to run multiple applications within a single process. The process is divided into virtual compartments - application domains. This improves the efficiency of memory allocated to processes. Application domains are no less secure than processes because their boundaries cannot be violated by managed applications.

    .NET Framework Class library (FCL)

    .NET includes class library assemblies. NET Framework Class library (FCL), containing definitions of several thousand types, each of which provides some functionality. Sets of "related" types are collected into separate namespaces. Thus, the System namespace contains a base class, Object, from which all other types are ultimately derived.

    Thus, every entity in. NET is an object with its own fields and methods.

    In addition, System contains types for integers, characters, strings, exception handling, console input/output, a group of types for safe conversion from one type to another, data formatting, random number generation and performing mathematical operations. All applications use types from the System namespace.

    To modify an existing FCL type, you can create your own derived type. You can create your own namespaces. All this will strictly comply with the principles proposed by the platform. NET

    Here are some of the most common namespaces and a brief description of the types they contain.

    Basic FCL namespaces
    Namespace Content
    System Fundamental data types and helper classes
    System.Collections Hash tables, variable arrays, and other containers
    System.Data ADO .NET Classes for Data Access
    System.Drawing Classes for graphics output (GDI+)
    System.IO File and Stream I/O Classes
    System.Net Classes for working with network protocols, such as HTTP
    System.Reflection Classes for reading and writing metadata
    System.Runtime.Remoting Classes for distributed applications
    System.ServiceProcess Classes for creating Windows services
    System.Threading Classes for creating and managing threads
    System.Web HTTP Support Classes
    System.Web.Services Classes for developing web services
    System.Web.Services. Classes for developing web service clients Protocols
    System.Web.UI Main classes used by ASP .NET
    System.Web.UI. WebControls ASP .NET Server Controls
    System.Wndows.Forms Classes for GUI Applications
    System.Xml Classes for reading and entering data in XML format

    All managed applications use