Liknande böcker
Programmer's Introduction to C#
Bok av Eric Gunnerson
WHEN YOU CREATE a new programming language, the first question you're asked invariably is, why? In creating C# we had several goals in mind: * To produce the first component-oriented language in the OC++ family. Soft- ware engineering is less and less about building monolithic applications and more and more about building components that slot into various exe- cution environments; for example, a control in a browser or a business object that executes in ASP+. Key to such components is that they have properties, methods, and events, and that they have attributes that provide declarative information about the component. All of these concepts are first -class language constructs inC#, making it a very natural language in which to construct and use components. * To create a language in which everything really is an object. Through innova- tive use of concepts such as boxing and unboxing, C# bridges the gap between primitive types and classes, allowing any piece of data to be treated as an object. Furthermore, C# introduces the concept of value types, which allows users to implement lightweight objects that do not require heap allocation. * To enable construction of robust and durable software. C# was built from the ground up to include garbage collection, structured exception handling, and type safety. These concepts completely eliminate entire categories of C++ programs.