[Previous] [Contents] [Next]

Classes and Members

First you see in a basic C# application the name of a class or namespace. As you learned in Chapter 1, "Fundamentals of Object-Oriented Programming," you should select a class name that describes a problem domain-for example, Invoice, PurchaseOrder, or Customer. The beginning and ending of a class's definition is marked by the "curlies": { and }, respectively. Everything in between is considered part of that C# class. Notice above that we have a class named HelloWorld and everything in the application is defined within the context of that class.-

All of a class's members are defined within the class's curlies. These include methods, fields, properties, indexers, attributes, and interfaces. I'll cover the specific details of how to define these different C# elements in the next several chapters.

[Previous] [Contents] [Next]