菜单
  

    .NET and C# introduction In order to understand the significance of .NET, it is useful to remind ourselves of the nature of many of the Windows technologies that have appeared in the past ten years or so. Although they may look quite different on the surface, all of the Windows operating systems from Windows 3.1 (introduced in 1992) through Windows Server 2003 have the same familiar Windows API at their core. As we’ve progressed through new versions of Windows, huge numbers of new functions have been added to the API, but this has been a process of evolving and extending the API rather than replacing it.

    While backward compatibility has been a crucial feature of Windows technologies and one of the strengths of the Windows platform, it does have a big disadvantage. Every time some technology evolves and adds new features, it ends up a bit more complicated than it was before.49282

    This fresh start is what C# and .NET are all about. Roughly speaking, .NET is a new framework—a new API—for programming on the Windows platform. Along with the .NET Framework, C# is a new lan- guage that has been designed from scratch to work with .NET, as well as to take advantage of all the progress in developer environments and in our understanding of object-oriented programming princi- ples that have taken place over the past 20 years.

    It’s in this context that Microsoft has decided to give developers an alternative—a language designed specifically for .NET, and designed with a clean slate. Visual C# .NET is the result. Officially, Microsoft describes C# as a “simple, modern, object-oriented, and type-safe programming language derived from C and C++.” Most independent observers would probably change that to “derived from C, C++, and Java.” Such descriptions are technically accurate but do little to convey the beauty or elegance of the lan- guage. Syntactically, C# is very similar to both C++ and Java, to such an extent that many keywords are the same, and C# also shares the same block structure with braces ({}) to mark blocks of code, and semi- colons to separate statements. The first impression of a piece of C# code is that it looks quite like C++ or Java code. Behind that initial similarity, however, C# is a lot easier to learn than C++, and of comparable difficulty to Java. Its design is more in tune with modern developer tools than both of those other lan- guages, and it has been designed to give us, simultaneously, 论文网the ease of use of Visual Basic, and the high- performance, low-level memory access of C++ if required. Some of the features of C# are:

    (1)Full support for classes and object-oriented programming, including both interface and imple- mentation inheritance, virtual functions, and operator overloading.

    (2)A consistent and well-defined set of basic types.

    (3)Built-in support for automatic generation of XML documentation.

    (4)Automatic cleanup of dynamically allocated memory.

    (5)The facility to mark classes or methods with user-defined attributes. This can be useful for doc- umentation and can have some effects on compilation (for example, marking methods to be compiled only in debug builds).

    (6)Full access to the .NET base class library, as well as easy access to the Windows API (if you really need it, which won’t be all that often).

    (7)Pointers and direct memory access are available if required, but the language has been designed in such a way that you can work without them in almost all cases.

    (8)Support for properties and events in the style of Visual Basic.

    (9)Just by changing the compiler options, you can compile either to an executable or to a library of .NET components that can be called up by other code in the same way as ActiveX controls(COM components).

    (10)C# can be used to write ASP.NET dynamic Web pages and XML Web services.

    Most of the above statements, it should be pointed out, do also apply to Visual Basic .NET and Managed C++. The fact that C# is designed from the start to work with .NET, however, means that its support for the features of .NET is both more complete, and offered within the context of a more suitable syntax than for those other languages. While the C# language itself is very similar to Java, there are some improve- ments: in particular, Java is not designed to work with the .NET environment.

  1. 上一篇:高校计算机辅助教学英文文献和中文翻译
  2. 下一篇:华为网络产品英文文献和中文翻译
  1. 汽车内燃机连杆载荷和应...

  2. 机械手系统英文文献和中文翻译

  3. 固体氧化物燃料电池英文文献和中文翻译

  4. 船舶运动仿真系统英文文献和中文翻译

  5. 新能源空调系统设计英文文献和中文翻译

  6. 正交试验回归法和响应曲...

  7. 机械设计制造及其自动化英文文献和中文翻译

  8. 中国传统元素在游戏角色...

  9. NFC协议物理层的软件实现+文献综述

  10. 高警觉工作人群的元情绪...

  11. 江苏省某高中学生体质现状的调查研究

  12. C++最短路径算法研究和程序设计

  13. 巴金《激流三部曲》高觉新的悲剧命运

  14. 现代简约美式风格在室内家装中的运用

  15. 上市公司股权结构对经营绩效的影响研究

  16. g-C3N4光催化剂的制备和光催化性能研究

  17. 浅析中国古代宗法制度

  

About

优尔论文网手机版...

主页:http://www.youerw.com

关闭返回