When the C# program is executed, the assembly is loaded into the CLR, which might take various actions based on the information in the manifest. Then, if the security requirements are met, the CLR performs just in time (JIT) compilation to convert the IL code to native machine instructions. The CLR also provides other services related to automatic garbage collection, exception handling, and resource management. Code that is executed by the CLR is sometimes referred to as "managed code," in contrast to "unmanaged code" which is compiled into native machine language that targets a specific system. The following diagram illustrates the compile-time and run-time relationships of C# source code files, the .NET Framework class libraries, assemblies, and the CLR.
Language interoperability is a key feature of the .NET Framework. Because the IL code produced by the C# compiler conforms to the Common Type Specification (CTS), IL code generated from C# can interact with code that was generated from the .NET versions of Visual Basic, Visual C++, Visual J#, or any of more than 20 other CTS-compliant languages. A single assembly may contain multiple modules written in different .NET languages, and the types can reference each other just as if they were written in the same language.
In addition to the run time services, the .NET Framework also includes an extensive library of over 4000 classes organized into namespaces that provide a wide variety of useful functionality for everything from file input and output to string manipulation to XML parsing, to Windows Forms controls. The typical C# application uses the .NET Framework class library extensively to handle common "plumbing" chores.
B.原文的翻译C#
C# 语法表现力强,而且简单易学。C# 的大括号语法使任何熟悉 C、C++ 或 Java 的人都可以立即上手。了解上述任何一种语言的开发人员通常在很短的时间内就可以开始使用 C# 高效地进行工作。C# 语法简化了 C++ 的诸多复杂性,并提供了很多强大的功能,例如可为 null 的值类型、枚举、委托、lambda 表达式和直接内存访问,这些都是 Java 所不具备的。C# 支持泛型方法和类型,从而提供了更出色的类型安全和性能。C# 还提供了迭代器,允许集合类的实施者定义自定义的迭代行为,以便容易被客户端代码使用。在 C# 3.0 中,语言集成查询 (LINQ) 表达式使强类型查询成为了一流的语言构造。论文网
作为一种面向对象的语言,C# 支持封装、继承和多态性的概念。所有的变量和方法,包括 Main 方法(应用程序的入口点),都封装在类定义中。类可能直接从一个父类继承,但它可以实现任意数量的接口。重写父类中的虚方法的各种方法要求 override 关键字作为一种避免意外重定义的方式。在 C# 中,结构类似于一个轻量类;它是一种堆栈分配的类型,可以实现接口,但不支持继承。
除了这些基本的面向对象的原理之外,C# 还通过几种创新的语言构造简化了软件组件的开发,这些结构包括:
封装的方法签名(称为“委托”),它实现了类型安全的事件通知。
- 上一篇:Android系统英文文献和中文翻译
- 下一篇:JSP技术英文文献及中文翻译
-
-
-
-
-
-
-
中考体育项目与体育教学合理结合的研究
大众媒体对公共政策制定的影响
河岸冲刷和泥沙淤积的监测国内外研究现状
杂拟谷盗体内共生菌沃尔...
十二层带中心支撑钢结构...
电站锅炉暖风器设计任务书
当代大学生慈善意识研究+文献综述
酸性水汽提装置总汽提塔设计+CAD图纸
乳业同业并购式全产业链...
java+mysql车辆管理系统的设计+源代码