We're almost ready to develop the Student Registration System (SRS) application in C#, based on the UML model that we created in Part Two. Before we dive into the specifics of coding the SRS, however, there are a number of additional C# language features that we want to cover, many of which we'll put to use in building the SRS.
Realize that we can't do justice to all of the remaining features of the C# language in just one chapter; C# is an extremely rich language, and most good C# references are many hundreds of pages long. Our goal isn't to duplicate the hard work that has gone into existing C# reference books, but instead to complement them by showing you how to bridge the gap between producing an object model and turning it into C# code—something that few, if any, other books do.
With that in mind, we'll be selective in terms of which aspects of the C# language we introduce in this chapter: namely, those that are most critical to understanding the SRS coding examples that follow in Chapters 14 through 16. Nonetheless, you'll have gone from "concept to code" and will acquire a very respectable working knowledge of C# by the time that we've finished.
|
In this chapter, you'll learn about the following:
The C# notion of namespaces—how to define them and why we use them
The object nature of a string, and some of the methods/properties provided to manipulate them
The Object class, a predefined class that is the ultimate base class of every C# type
Using a special keyword, this, to "self-reference" an object from within one of its own methods
The object nature of arrays and some of the methods/properties provided to manipulate them
The List and Dictionary classes, two of the .NET Framework generic collection classes
The nature of object identities in C#, how to discover the true class that an object belongs to, and how to test the equality of two C# objects
Important variants on the Main method and the base keyword
How auto-implemented properties can be used to simplify code listings
How dynamically created objects are deleted to recycle their memory and the role that the common language runtime (CLR) garbage collector plays in this recycling
A .NET Framework language construct called an attribute
We'll also revisit some of the topics that we introduced in earlier chapters to provide you with additional insights.