334 Object-Based Programming Chapter 8 Fig. 8.20 Fig.
334 Object-Based Programming Chapter 8 Fig. 8.20 Fig. 8.20Fig. 8.FiFi20g. 8.20g. 8.20Class View of class Time1(Fig. 8.1) and class TimeTest(Fig. 8.2). boxes). The lock icons, placed to the left of the blue-box icons for the instance variables, specify that the variables are private. Class TimeTest1contains method Main. Note that both class Time1and class TimeTest1contain the Bases and Interfaces node. If you expand this node, you will see class Object in each case, because each class inherits from class System.Object(discussed in Chapter 9). Visual Studio s Object Browser lists all classes in the C# library. Developers use the Object Browser to learn about the functionality provided by a specific class. To open the Object Browser, right click any built-in C# class or method in the code editor and select Go To Definition. Figure 8.21 depicts the Object Browser when the user right clicks the class name Objectin the code editor. Note that the Object Browser lists all methods provided by class Object in the Members of ‘Object’ window this window offers developers instant access to information regarding the functionality of various objects. Note also that the Object Browser lists in the Objects window all classes in the FCL. The Object Browser can be a quick mechanism to learn about a class or method of a class. Remember that you can also view the complete description of a class or method in the online documentation available through the Help menu in Visual Studio .NET. This chapter is the first in a series of three chapters that cover the fundamentals of object-based and object-oriented programming. In this chapter, we discussed how to create proper class definitions, how to control access to class members and several features commonly used to craft valuable classes for reuse by other programmers. Chapter 9, focusses on inheritance. In that chapter, you will learn how to build classes that inherit data and functionality from existing class definitions. You also will learn other C# features that are specific to the inheritance relationship between classes. These features serve as the basis for the object-oriented programming concept called polymorphism that we present in Chapter 10.
We would like to recommend you tested and proved virtual web hosting services, which you will surely find to be of great quality.