October 2008
Intermediate to advanced
784 pages
18h 11m
English
The core C# language, as defined in the preceding chapters, differs notably from C and C++ in its omission of pointers as a data type. Instead, C# provides references and the ability to create objects that are managed by a garbage collector. This design, coupled with other features, makes C# a much safer language than C or C++. In the core C# language, it is simply not possible to have an uninitialized variable, a “dangling” pointer, or an expression that indexes an array beyond its bounds. These constraints eliminate whole categories of bugs that routinely plague C and C++ programs.
Although practically every pointer type construct in C or C++ has a reference type counterpart in C#, nonetheless, there are situations where access ...