CSLA-NetFramework
- 格式:ppt
- 大小:858.42 KB
- 文档页数:35
netframework 引用 standard
在 .NET Framework 中引用 `System.Standard` 命名空间,需要确保你正在使用的是正确的 .NET Framework 版本。
`System.Standard` 是在 .NET 5.0 及更高版本中引入的命名空间,而 .NET Framework 的最高版本是 4.8。
因此,.NET Framework 不包含
`System.Standard` 命名空间。
如果你想使用 `System.Standard` 命名空间中的类型和成员,你需要将你的项目迁移到 .NET 5.0 或更高版本。
这可能涉及到更改项目的目标框架、安装适当的 .NET SDK,并更新你的代码以使用新的命名空间和类型。
请注意,.NET 5.0 及更高版本与 .NET Framework 是不同的产品,它们具有不同的特性、功能和命名空间。
在迁移到新的 .NET 版本之前,建议仔细评估项目的需求和兼容性,并确保你的代码在新的环境中能够正常运行。
CSharp学习资料第一章.NET体系结构简介体系主要由以下两部分组成Framework类库.NETFramework类库是一个内容丰富的类集合,它可以完成以前要通过WindowAPI来完成的绝大多数任务。
CLR是.NETFramework的核心执行环境,也称.NET运行库。
1.2CLR概述CLR主要负责“托管代码”的编译和运行。
在.NET中代码的编译分为两个阶段,如图1.1所示:1、把源代码编译为Microoft中间语音(MSIL);2、CLR把MSIL编译为平台专用的代码。
某.cC#源代码编译器CLR激活JIT目标机器MSIL微软(Window中间语音、Linu某等)图中C#语音的执行过程1.21托管代码(ManagedCode)托管代码是由CLR运行环境(不是直接由操作系统)执行的代码。
托管代码的优点:平台无关性提高性能语音的互操作性1.22非托管代码(UnmanagedCode)非托管代码是由操作系统直接执行的代码。
非托管代码必须提供自己的垃圾回收、类型检查、安全支持等服务;它与托管代码不同,后者从公共语言运行库中获得这些服务。
非托管代码有汇编语音、C语音等。
托管代码和非托管代码区别:前者运行效率稍低,代码编写容易,开发效率高;后者运行效率高,代码编写较难,开发效率低。
第二章面向对象语言C#基础2.1C#简介2.11第一个C#程序(控制台应用程序)uingSytem;//引用命名空间namepaceBitPC.CSharp.Baic//定义命名空间{claMyFirtCSharpCla//引用类类型{publictaticvoidMain()//方法{Conole.WriteLine(“ThiimyfirtC#program!”);//输出无参字符串//输出带参数的字符串Conole.WriteLine(“{0},你好,你的性别是{1}的!”,”唐健”,”男”);Conole.ReadLine();return;}}}2.2变量2.21变量的定义及初始化在C#中声明变量使用的语法:数据类型变量;例如:inti;变量只能先定义后使用;定义变量后必须初始化才能使用;变量要占用一定字节数的内存单元,以上声明会在堆栈中给i分配4个字节。
About the T utorial.NET Core is the latest general purpose development platform maintained by Microsoft. It works across different platforms and has been redesigned in a way that makes .NET fast, flexible and modern..NET Core happens to be one of the major contributions by Microsoft. Developers can now build Android, iOS, Linux, Mac, and Windows applications with .NET, all in Open Source.AudienceThis tutorial is designed for software programmers who want to learn the basics of .NET Core.PrerequisitesYou should have a basic understanding of Computer Programming terminologies. A basic understanding of any of the programming languages is a plus.Disclaimer & CopyrightCopyright 2018 by Tutorials Point (I) Pvt. Ltd.All the content and graphics published in this e-book are the property of Tutorials Point (I) Pvt. Ltd. The user of this e-book is prohibited to reuse, retain, copy, distribute or republish any contents or a part of contents of this e-book in any manner without written consent of the publisher.We strive to update the contents of our website and tutorials as timely and as precisely as possible, however, the contents may contain inaccuracies or errors. Tutorials Point (I) Pvt. Ltd. provides no guarantee regarding the accuracy, timeliness or completeness of our website or its contents including this tutorial. If you discover any errors on our website or inthistutorial,******************************************.T able of ContentsAbout the Tutorial (i)Audience (i)Prerequisites (i)Disclaimer & Copyright (i)Table of Contents (ii) Core – Overview (1)Characteristics of .NET Core (1)The .NET Core Platform (2) Core – Prerequisites (3) Core – Environment Setup (4)Visual Studio 2015 (4) Core – Getting Started (10) Core – Numerics (13)Integral types (13)Floating-point types (13) Core – Garbage Collection (16)Advantages of Garbage Collection (16)Conditions for Garbage Collection (16)Generations (16) Core – Code Execution (18).NET Core Code Execution Process (19) Core – Modularity (21) Core – Project Files (24) Core – Package References (28) Core – Create UWP App with .NET Core (34) Core – MSBuild (42) Core – Metapackage (47) Core – Windows Runtime and Extension SDKs (53) Core – Create .NET Standard Library (58) Core – Portable Class Library (63)What is PCL (64) Core – Adding References to Library (72) Core – Sharing .NET Core Libraries (77) Core – Creating a Xamarin.Forms Project (87) Core – PCL Troubleshooting (95) Core – Create a Testing Project (105) Core – Running Tests in Visual Studio (109) Core – Testing Library (116) Core – Managed Extensibility Framework (124) Core – .NET Core SDK (134) Core – MSBuild and project.json (140)MSBuild vs project.json (141) Core – Restoring and Building with MSBuild (143) Core – Migrations (147).NET Core is the latest general purpose development platform maintained by Microsoft. It works across different platforms and has been redesigned in a way that makes .NET fast, flexible and modern. This happens to be one of the major contributions by Microsoft. Developers can now build Android, iOS, Linux, Mac, and Windows applications with .NET, all in Open Source.In this tutorial, we will cover .NET Core and a few new innovations including the .NET Framework updates, .NET Standard, and Universal Windows Platform updates, etc.Characteristics of .NET CoreThe following are the major characteristics of .NET Core:Open source∙.NET Core is an open source implementation, using MIT and Apache 2 licenses.∙.NET Core is a .NET Foundation project and is available on GitHub.∙As an open source project, it promotes a more transparent development process and promotes an active and engaged community.Cross-platform∙Application implemented in .NET Core can be run and its code can be reused regardless of your platform target.∙It currently supports three main operating systems (OS):o Windowso Linuxo MacOS∙The supported Operating Systems (OS), CPUs and application scenarios will grow over time, provided by Microsoft, other companies, and individuals.Flexible deployment∙There can be two types of deployments for .NET Core applications:o Framework-dependent deploymento Self-contained deployment4.NET Core5∙ With framework-dependent deployment, your app depends on a system-wide version of .NET Core on which your app and third-party dependencies are installed.∙With self-contained deployment, the .NET Core version used to build your application is also deployed along with your app and third-party dependencies and can run side-by-side with other versions.Command-line tools∙All product scenarios can be exercised at the command-line.Compatible∙.NET Core is compatible with .NET Framework, Xamarin and Mono, via the .NET Standard Library.Modular∙ .NET Core is released through NuGet in smaller assembly packages.∙ .NET Framework is one large assembly that contains most of the core functionalities. ∙ .NET Core is made available as smaller feature-centric packages.∙ This modular approach enables the developers to optimize their app by including just those NuGet packages which they need in their app.∙The benefits of a smaller app surface area include tighter security, reduced servicing, improved performance, and decreased costs in a pay-for-what-you-use model.The .NET Core Platform.NET Core Platform contains the following main parts:∙ .NET Runtime : It provides a type system, assembly loading, a garbage collector, native interop and other basic services.∙ Fundamental Libraries : A set of framework libraries, which provide primitive data types, app composition types and fundamental utilities.∙ SDK & Compiler : A set of SDK tools and language compilers that enable the base developer experience, available in the .NET Core SDK.∙‘dotnet’ app host : it is used to launch .NET Core apps. It selects the runtime and hosts the runtime, provides an assembly loading policy and launches the app. The same host is also used to launch SDK tools in much the same way..NET Core6In this chapter, we will discuss the various dependencies that you need to deploy and run. These include the .NET Core applications on Windows machines that are developed using Visual Studio.Supported Windows Versions.NET Core is supported on the following versions of Windows:∙ Windows 7 SP1 ∙ Windows 8.1 ∙ Windows 10∙ Windows Server 2008 R2 SP1 (Full Server or Server Core) ∙ Windows Server 2012 SP1 (Full Server or Server Core) ∙ Windows Server 2012 R2 SP1 (Full Server or Server Core) ∙Windows Server 2016 (Full Server, Server Core or Nano Server)Dependencies∙If you are running your .NET Core application on Windows versions earlier than Windows 10 and Windows Server 2016, then it will also require the Visual C++ Redistributable.∙ This dependency is automatically installed for you if you use the .NET Core installer. ∙You need to manually install the Visual C++ Redistributable for Visual Studio 2015 if you are installing .NET Core via the installer script or deploying a self-contained .NET Core application.∙For Windows 7 and Windows Server 2008 machines, you need to make sure that your Windows installation is up-to-date and also includes hotfix KB2533623 installed through Windows Update.Prerequisites with Visual Studio∙ To develop .NET Core applications using the .NET Core SDK, you can use any editor of your choice.∙However, if you want to develop .NET Core applications on Windows using Visual Studio, you can use the following two versions:o Visual Studio 2015 o Visual Studio 2017 RC.NET Core7Projects created with Visual Studio 2015 will be project.json-based by default while projects created with Visual Studio 2017 RC will always be MSBuild-based.In this chapter, we will discuss the Environment Setup of .NET Core. It is a significant redesign of the .NET Framework. To use .NET Core in your application, there are two versions you can use:∙Visual Studio 2015∙Visual Studio 2017 RCVisual Studio 2015To use Visual Studio 2015, you must have installed the following;∙Microsoft Visual Studio 2015 Update 3∙Microsoft .NET Core 1.0.1 - VS 2015 Tooling Preview 2Microsoft provides a free version of visual studio which also contains the SQL Server and can be downloaded from https:///en-us/downloads/download-visual-studio-vs.aspx and Microsoft .NET Core 1.0.1 - VS 2015 Tooling Preview 2 can be downloaded from https:///fwlink/?LinkId=817245.You can also follow the installation guidelines on the following Url https:///net/core/#windowsvs2015.Installation of Visual Studio 2015Follow these steps to install Visual Studio 2015:Step 1: Once the downloading completes, then run the installer. The following dialog box will be displayed.89Step 2: Click Install to start the installation process.Step 3: Once the installation completes, you will see the following dialog box.Step 4: Close this dialog and restart your computer if required.10Step 5: Open Visual Studio from the Start Menu; you will receive the following dialog box. It may take a few minutes to load and finally be used for the first time.Step 6: Once it is loaded, you will see the following screen.11Step 7: Once Visual Studio installation is finished, then close Visual Studio and launch Microsoft .NET Core - VS 2015 Tooling Preview 2.Step 8: Check the checkbox and click Install.12Step 9: Once the installation completes, you will see the following dialog box.You are now ready to start your application using .NET Core.Visual Studio 2017In this tutorial, we will be using Visual Studio 2015, but if you want to use Visual Studio 2017, an experimental release of .NET Core tools for Visual Studio is included in Visual Studio 2017 RC and you can see the installation guidelines here https:///net/core/#windowsvs2017.13Visual Studio 2015 provides a full-featured development environment for developing .NET Core applications. In this chapter, we will be creating a new project inside Visual Studio. Once you have installed the Visual Studio 2015 tooling, you can start building a new .NET Core Application.In the New Project dialog box, in the Templates list, expand the Visual C# node and select .NET Core and you should see the following three new project templates: ∙Class Library (.NET Core)∙Console Application (.NET Core)∙ Core Web Application (.NET Core)In the middle pane on the New Project dialog box, select Console Application (.NET Core) and name it "FirstApp", then click OK.14Visual Studio will open the newly created project, and you will see in the Solution Explorer window all of the files that are in this project.To test that .NET core console application is working, let us add the following line.Now, run the application. You should see the following output.1617.NET Core supports the standard numeric integral and floating-point primitives. It also supports the following types:∙ System.Numerics.BigInteger which is an integral type with no upper or lower bound. ∙ plex is a type that represents complex numbers.∙A set of Single Instruction Multiple Data (SIMD)-enabled vector types in the System.Numerics namespace.Integral types.NET Core supports both signed and unsigned integers of different ranges from one byte to eight bytes in length. All integers are value types.The following table represents the integral types and their size;Each integral type supports a standard set of arithmetic, comparison, equality, explicit conversion, and implicit conversion operators.You can also work with the individual bits in an integer value by using the System.BitConverter class.Floating-point types.NET Core includes three primitive floating point types, which are shown in the following table.∙Each floating-point type supports a standard set of arithmetic, comparison, equality, explicit conversion, and implicit conversion operators.∙You can also work with the individual bits in Double and Single values by using the BitConverter class.∙The Decimal structure has its own methods, Decimal.GetBits and Decimal.Decimal(Int32()), for working with a decimal value's individual bits, as well as its own set of methods for performing some additional mathematical operations.BigInteger∙System.Numerics.BigInteger is an immutable type that represents an arbitrarily large integer whose value in theory has no upper or lower bounds.∙The methods of the BigInteger type is closely parallel to those of the other integral types.Complex∙The plex type represents a complex number, i.e., a number witha real number part and an imaginary number part.∙It supports a standard set of arithmetic, comparison, equality, explicit conversion, and implicit conversion operators, as well as mathematical, algebraic, and trigonometric methods.SIMD∙The Numerics namespace includes a set of SIMD-enabled vector types for .NET Core.∙SIMD allows some operations to be parallelized at the hardware level, which results in huge performance improvements in mathematical, scientific, and graphics apps that perform computations over vectors.∙The SIMD-enabled vector types in .NET Core include the following:o System.Numerics.Vector2, System.Numerics.Vector3, and System.Numerics.Vector4 types, which are 2, 3, and 4-dimensional vectors oftype Single.o The Vector<T> structure that allows you to create a vector of any primitive numeric type. The primitive numeric types include all numeric types in theSystem namespace except for Decimal.18o Two matrix types, System.Numerics.Matrix3x2, which represents a 3x2 matrix;and System.Numerics.Matrix4x4, which represents a 4x4 matrix.o The System.Numerics.Plane type, which represents a three-dimensional plane, and the System.Numerics.Quaternion type, which represents a vector that is used to encode three-dimensional physical rotations.19.NET Core20 In this chapter, we will cover the concept of Garbage collection which is one of most important features of the .NET managed code platform. The garbage collector (GC) manages the allocation and release of memory. The garbage collector serves as an automatic memory manager.∙You do not need to know how to allocate and release memory or manage the lifetime of the objects that use that memory. ∙An allocation is made any time you declare an object with a “new” keyword or a value type is boxed. Allocations are typically very fast. ∙When there isn’t enough memory to allocate an object, the GC must collect and dispose of garbage memory to make memory available for new allocations. ∙ This process is known as garbage collection .Advantages of Garbage CollectionGarbage Collection provides the following benefits:∙You don’t need to free memory manually while developing your application. ∙It also allocates objects on the managed heap efficiently. ∙When objects are no longer used then it will reclaim those objects by clearing their memory, and keeps the memory available for future allocations. ∙Managed objects automatically get clean content to start with, so their constructors do not have to initialize every data field. ∙ It also provides memory safety by making sure that an object cannot use the content of another object.Conditions for Garbage CollectionGarbage collection occurs when one of the following conditions is true.∙The system has low physical memory. ∙The memory that is used by allocated objects on the managed heap surpasses an acceptable threshold. This threshold is continuously adjusted as the process runs. ∙ The GC.Collect method is called and in almost all cases, you do not have to call thismethod, because the garbage collector runs continuously. This method is primarily used for unique situations and testing..NET Core21 GenerationsThe .NET Garbage Collector has 3 generations and each generation has its own heap that that is used for the storage of allocated objects. There is a basic principle that most objects are either short-lived or long-lived.Generation First (0)∙In Generation 0, objects are first allocated. ∙In this generation, objects often don’t live past the first generation, since they are no longer in use (out of scope) by the time the next garbage collection occurs. ∙ Generation 0 is quick to collect because its associated heap is small.Generation Second (1)∙In Generation 1, objects have a second chance space. ∙Objects that are short-lived but survive the generation 0 collection (often based on coincidental timing) go to generation 1. ∙Generation 1 collections are also quick because its associated heap is also small. ∙ The first two heaps remain small because objects are either collected or promoted to the next generation heap.Generation Third (2)∙In Generation 2, all long objects are lived and its heap can grow to be very large. ∙The objects in this generation can survive a long time and there is no next generation heap to further promote objects. ∙The Garbage Collector has an additional heap for large objects known as Large Object Heap (LOH). ∙It is reserved for objects that are 85,000 bytes or greater. ∙Large objects are not allocated to the generational heaps but are allocated directly to the LOH. ∙Generation 2 and LOH collections can take noticeable time for programs that have run for a long time or operate over large amounts of data. ∙Large server programs are known to have heaps in the 10s of GBs. ∙The GC employs a variety of techniques to reduce the amount of time that it blocks program execution. ∙The primary approach is to do as much garbage collection work as possible on a background thread in a way that does not interfere with program execution. ∙The GC also exposes a few ways for developers to influence its behavior, which can be quite useful to improve performance.In this chapter, we will understand the execution process of .NET Core and compare it with the .NET Framework. The managed execution process includes the following steps.∙Choosing a compiler∙Compiling your code to MSIL∙Compiling MSIL to native code∙Running codeChoosing a Compiler∙It is a multi-language execution environment, the runtime supports a wide variety of data types and language features.∙To obtain the benefits provided by the common language runtime, you must use one or more language compilers that target the runtime.Compiling your code to MSIL∙Compiling translates your source code into Microsoft Intermediate Language (MSIL)and generates the required metadata.22∙Metadata describes the types in your code, including the definition of each type, the signatures of each type's members, the members that your code references, and other data that the runtime uses at execution time.∙The runtime locates and extracts the metadata from the file as well as from framework class libraries (FCL) as needed during execution.23End of ebook previewIf you liked what you saw…Buy it from our store @ https://24。
.net framework是由微软公司开发的一个用于构建和运行应用程序的评台。
它提供了许多功能和工具,帮助开发人员快速构建稳健、可靠的应用程序,并且可以在不同的操作系统上运行。
在本文中,我们将了解.net framework的用法,包括安装、配置、开发和调试应用程序等方面的内容。
一、安装.net framework1. 确认系统要求:在安装.net framework之前,首先需要确认系统是否符合.net framework的要求。
通常情况下,Windows操作系统都是支持.net framework的,但是需要确认系统的版本是否兼容。
2. 下载.net framework安装包:可以通过微软冠方全球信息站或者其他可信赖的来源下载.net framework的安装包。
根据系统版本选择合适的安装包进行下载。
3. 安装.net framework:下载完成安装包后,双击运行安装程序,按照提示进行安装。
在安装过程中,可以选择程序集、语言包等组件进行安装,根据自己的需求选择。
二、配置.net framework1. 配置开发环境:在使用.net framework进行开发之前,需要配置开发环境。
通常情况下,可以使用Visual Studio等集成开发环境进行开发,需要安装对应的开发工具包和运行时库。
2. 配置应用程序运行环境:在部署应用程序时,需要配置应用程序运行环境。
可以使用.net framework提供的工具进行应用程序打包、发布和部署,以确保在目标系统上能够正常运行。
三、开发应用程序1. 创建项目:使用Visual Studio等开发工具,新建一个项目,选择.net framework作为目标框架。
2. 编写代码:使用C#、等编程语言编写应用程序的代码。
借助.net framework提供的类库和工具,可以快速构建应用程序的逻辑和界面。
3. 调试应用程序:在开发过程中,可以使用调试工具对应用程序进行调试,定位和修复程序中的错误和异常。
单独编译framework单独编译frameworkFramework是iOS开发中常用的一种代码结构,可以将一些常用的功能或库代码封装成独立的模块,方便在不同项目中复用。
这些模块一般被编译成一个单独的库,成为framework。
在iOS应用开发中,我们经常会使用系统提供的一些framework库,比如UIKit、Foundation等。
同时,我们也可以自己编写framework,并供其他开发者使用。
编写一个framework的过程可以分为三个步骤:创建framework项目,添加需要封装的代码,最后将framework编译成库文件。
一般来说,我们将封装的代码放到一个专门的文件夹中,通过在Build Settings中配置Header Search Paths来告诉编译器头文件的位置,再在Build Phases > Compile Sources中添加要编译的源文件即可。
完成代码编写后,我们需要将framework编译成库文件。
一般情况下,我们可以通过选择Product > Archive来自动构建和打包framework。
如果需要手动打包,可以打开终端,将目录切换到framework文件所在的目录,执行如下命令:xcodebuild -configuration “Release” -target "xxx" -arch "xxx" -sdk iphoneos其中,xxx表示具体的framework名称、架构类型和SDK版本。
通过上述步骤,我们就可以生成一个可单独使用的framework库文件了。
在其他项目中使用这个库也很简单,只需要将.framework文件添加到项目中,然后在Build Phases > Link Binary With Libraries中添加即可。
总之,编写和使用framework可以提高代码的重用性和开发效率,值得开发者在实践中掌握。
.NETFramework概述 Framework是为其运⾏的应⽤程序提供各种服务的托管执⾏环境,它包括两个主要组件:(1).公共语⾔运⾏时 (CLR),(2) Framework 类库; Framework的核⼼是CLR;3.CLR的核⼼CTS,CLS(公共语⾔规范 );4.CTS是通⽤类型系统(Common Type System);5.CLS是公共语⾔定义(Common Language Specification);6.CLR是公共语⾔运⾏时(Common language runtime) ;7.CLR的执⾏模型: 1、将源代码(vb、cs)编译成托管代码块。
托管代码块由中间语⾔和元数据组成。
2、将托管代码合并成程序集,也叫组件(dll)。
程序集中包含了⼀张叫做“清单”的模块,记录了构成程序集模块构成的信息包括资源⽂件及需要引⽤⾃⼰的信息。
3、加载公共语⾔运⾏库。
4、执⾏程序集的代码。
5、⽣成本地代码。
8.CLI:公共语⾔基础架构,定义了⼀个语⾔⽆关的跨体系结构的运⾏环境,这使得开发者可以⽤规范内定义的各种⾼级语⾔来开发软件,并且⽆需修正即可将软件运⾏在不同的计算机体系结构上;9.BCL:基础类库BCL是⼀个公共编程框架,称为基类库,所有语⾔的开发者都能利⽤它。
是CLI(Common Language Infrastructure,公共语⾔基础结构)的规范之⼀,主要包括:执⾏⽹络操作,执⾏I/O操作,安全管理,⽂本操作,数据库操作,XML操作,与事件⽇志交互,跟踪和⼀些诊断操作,使⽤⾮托管代码,创建与调⽤动态代码等,粒度相对较⼩,为所有框架提供基础⽀持。
10:FCL,框架类库(Framework Class Library)FCL提供了⼤粒度的编程框架,它是针对不同应⽤设计的框架,FCL⼤部分实现都引⽤了BCL,例如我们常说的开发框架:、MVC、WCF和WPF等等,提供了针对不同层⾯的编程框架。
msil net 结构解析MSIL(Microsoft Intermediate Language)是.NET Framework 中的一种中间语言,它是在源代码编译为可执行文件之前,通过将源代码转换为一种与特定平台无关的中间代码来实现的。
本文将对MSIL和.NET结构进行解析,介绍其原理和应用。
一、MSIL的概述MSIL是一种面向对象的、类型安全的、与平台无关的中间语言。
它是.NET Framework的一部分,用于将高级语言编译为可执行代码。
在编译过程中,高级语言(如C#、等)被转换为MSIL,然后通过即时(Just-In-Time)编译器转换为与特定平台相关的本机代码。
二、MSIL的特点1. 与平台无关:MSIL是一种与特定平台无关的中间语言,可以在不同的操作系统和硬件平台上运行。
2. 类型安全:MSIL支持强类型检查,可以确保代码的类型安全性,避免类型转换错误。
3. 面向对象:MSIL支持面向对象编程,可以使用类、接口、继承等特性进行开发。
4. 可读性较强:MSIL是一种可读性较强的中间语言,开发人员可以通过反编译工具查看和分析MSIL代码。
5. 支持动态编译:由于MSIL是一种中间语言,可以在运行时动态编译和执行代码。
三、MSIL的编译过程1. 编写源代码:开发人员使用高级语言编写源代码,如C#、等。
2. 编译源代码:源代码通过编译器编译为MSIL代码。
3. MSIL转换为本机代码:在运行时,即时(Just-In-Time)编译器将MSIL代码转换为与特定平台相关的本机代码。
4. 执行本机代码:转换为本机代码后,程序可以在特定平台上运行。
四、MSIL的优势和应用1. 跨平台:MSIL的与平台无关性使得.NET Framework可以在不同的操作系统上运行,如Windows、Linux等。
2. 高效性:由于MSIL代码是与特定平台无关的中间代码,通过即时编译器可以将其转换为高效的本机代码,提高程序的执行效率。