菜单
  

    .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. 酸性水汽提装置总汽提塔设计+CAD图纸

  10. 乳业同业并购式全产业链...

  11. 十二层带中心支撑钢结构...

  12. java+mysql车辆管理系统的设计+源代码

  13. 电站锅炉暖风器设计任务书

  14. 河岸冲刷和泥沙淤积的监测国内外研究现状

  15. 中考体育项目与体育教学合理结合的研究

  16. 大众媒体对公共政策制定的影响

  17. 杂拟谷盗体内共生菌沃尔...

  

About

751论文网手机版...

主页:http://www.751com.cn

关闭返回