We're almost ready to develop the Student Registration System (SRS) application in C#, based on the UML model that we've 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'd like 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 rather 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're going to 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 Student Registration System coding examples that follow in Chapters 14 through 16. Nonetheless, you'll have a very respectable working knowledge of C# by the time that we've finished.
Even if you've already been programming in C# for a while, and thus feel that you have a fairly good grasp of the language syntax, we encourage you to at least skim this chapter before moving on to Chapter 14, because we mention a few things along the way with regard to how we'll be approaching the SRS.
In this chapter, you'll learn about
How to set up a C# programming environment on your machine
C# source files, including naming and content conventions
How to compile and run C# programs
The C# notion of namespaces—how to define them, and why we use them
How to read input from the command line when a C# application is invoked, as well as how to prompt the user for keyboard input, useful techniques when testing an application from the command line
The Object class, a predefined class that is the ultimate base class of every C# type
The object nature of strings, and some of the methods/properties provided to manipulate them
The object nature of arrays, and some of the methods/properties provided to manipulate them
The Hashtable class, one of the .NET Framework 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
Using a special keyword, this, to "self-reference" an object from within one of its own methods
How dynamically created objects are deleted so as to recycle their memory, and the role that the common language runtime garbage collector plays in this recycling
A .NET Framework language construct called an attribute (not to be confused with "attributes" in the generic OO sense as we've used the term thus far)
We'll also revisit some of the topics that we introduced in earlier chapters to provide you with additional insights.