文档介绍:C#
A History of C, C++, and C#
The C# programming language was created in the spirit of the C and C++ programming
languages. This accounts for its powerful features and easy learning curve. The same can't be
said for C and C++, but because C# was created from the ground up, Microsoft took the
liberty of removing some of the more burdensome features — such as pointers. This section
takes a look at the C and C++ languages, tracing their evolution into C#.
The C programming language was originally designed for use on the UNIX operating system.
C was used to create many UNIX applications, including a piler, and was eventually
used to write UNIX itself. Its widespread acceptance in the academic arena expanded to
include mercial world, and software vendors such as Microsoft and Borland released
pilers for puters. The original Windows API was designed to work with
Windows code written in C, and the latest set of the core Windows operating system APIs
patible with C to this day.
From a design standpoint, C lacked a detail that other languages such as Smalltalk had already
embraced: the concept of an object. You'll learn more about objects in Chapter 8, " Writing
Object-Oriented Code." For now, think of an object as a collection of data and a set of
operations that can be performed on that data. Object-style coding could be plished
using C, but the notion of an object was not enforced by the language. If you wanted to
structure your code to resemble an object, fine. If you didn't, fine. C really didn't care. Objects
weren't an inherent part of the language, so many people didn't pay much attention to this
programming paradigm.
After the notion of object-oriented development began to gain acceptance, it became clear that
C needed to be refined to embrace this new way of thinking about code. C++ was created to
embody this refinement. It was designed to be patible with C (such that all C
programs would also be C++ programs