Where C# Fits In In one sense, C# can be seen as being the same thing to programming languages as 。NET is to the Windows environment。 Just as Microsoft has been adding more and more features to Windows and the Windows API over the past decade, Visual Basic and C++ have undergone expansion。 Although Visual Basic and C++ have ended up as hugely powerful languages as a result of this, both languages also suffer from problems due to the legacies of how they have evolved。 76220

In the case of Visual Basic 6 and earlier, the main strength of the language was the fact that it was simple to understand and didn’t make many programming tasks easy, largely hiding the details of the Windows API and the COM component infrastructure from the developer。 The downside to this was that Visual Basic was never truly object-oriented, so that large applications quickly become disorganized and hard to maintain。 As well as this, because Visual Basic’s syntax was inherited from early versions of BASIC (which, in turn, was designed to be intuitively simple for beginning programmers to understand, rather than to write large commercial applications), it didn’t really lend itself to well-structured or object-oriented programs。 C++, on the other hand, has its roots in the ANSI C++ language definition。 It isn’t completely ANSIcompliant for the simple reason that Microsoft first wrote its C++ compiler before the ANSI definition had become official, but it comes close。 Unfortunately, this has led to two problems。 First, ANSI C++ has its roots in a decade-old state of technology, and this shows up in a lack of support for modern concepts (such as Unicode strings and generating XML documentation), and in some archaic syntax structures designed for the compilers of yesteryear (such as the separation of declaration from definition of member functions)。 Second, Microsoft has been simultaneously trying to evolve C++ into a language that is designed for high-performance tasks on Windows, and in order to achieve that they’ve been forced to add a huge number of Microsoft-specific keywords as well as various libraries to the language。 

The result is that on Windows, the language has become a complete mess。 Just ask C++ developers how many definitions for a string they can think of: char*, LPTSTR, string, CString (MFC version), CString (WTL version), wchar_t*, OLECHAR*, and so on。 

Now enter 。NET—a completely new environment that is going to involve new extensions to both languages。 Microsoft has gotten around this by adding yet more Microsoft-specific keywords to C++, and by completely revamping Visual Basic into Visual Basic 。NET, a language that retains some of the basic VB syntax but that is so different in design that we can consider it to be, for all practical purposes, a new language。 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 language。 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 semicolons 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 languages, 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。 

上一篇:JSP的技术英文文献和中文翻译
下一篇:薄壁行星齿轮的变形体动力学英文文献和中文翻译

数控机床制造过程的碳排...

新的数控车床加工机制英文文献和中文翻译

抗震性能的无粘结后张法...

锈蚀钢筋的力学性能英文文献和中文翻译

未加筋的低屈服点钢板剪...

台湾绿色B建筑节水措施英文文献和中文翻译

汽车内燃机连杆载荷和应...

新課改下小學语文洧效阅...

互联网教育”变革路径研究进展【7972字】

老年2型糖尿病患者运动疗...

我国风险投资的发展现状问题及对策分析

LiMn1-xFexPO4正极材料合成及充放电性能研究

ASP.net+sqlserver企业设备管理系统设计与开发

安康汉江网讯

麦秸秆还田和沼液灌溉对...

网络语言“XX体”研究

张洁小说《无字》中的女性意识