Finding the Default Member of a Class

The icons next to a class or member name provide information about the item, such as whether it's a method or a property. A method with the following icon:

or a property with the following icon: is the default member of its class.

Although default members can be used simply by referring to their class, doing so can sometimes make your code less readable. For example, although CostRateTable(2) is much less readable than CostRateTable.Index(2) because the default property for most objects is Name, using Tasks(4) (or any collection name) instead of Tasks. Item(4) is a common practice.

The Details pane at the bottom of the Object Browser (see Figure 31-10) lists specifics about the selected item, such as whether a property is read-only or read/write, the numerical value for a constant, or the arguments for a method.

Parent member of Group w

Parent member of Group

Group class Details pane

Figure 31-10. For properties or methods that return objects, the name of the object is a link in the Details pane.

It can be useful, especially if several libraries are referenced by your project, to filter the list of items shown in the object browser. You might also want to search for specific items by name or by part of a name. Use the Library and Search Text boxes (see Figure 31-11) to filter the list of items referenced by your project and search for specific items, respectively.

I Assignments I Availabilities k- Object [

MSProject ▼


<All Libraries;-

Ml «1



ProjectGlobal stdole

» About ? ActiveCell


? Active Project

I Assignments I Availabilities lui1 ActiveSeiection lui1 ActiveWindow lui1 ActiveSeiection lui1 ActiveWindow

Figure 31-11. Use the Library box to filter items in the object browser and the Search Text box to find specific items.

Note By default, the Search Text box performs "loose" searches, which means that searching for task returns items such as Task, TaskDependency, ExternalTask, DefaultTaskType, and so on.

To return only exact matches for a search, right-click anywhere in the Object Browser window and then click Find Whole Word Only.

Project Management Made Easy

Project Management Made Easy

What you need to know about… Project Management Made Easy! Project management consists of more than just a large building project and can encompass small projects as well. No matter what the size of your project, you need to have some sort of project management. How you manage your project has everything to do with its outcome.

Get My Free Ebook

Post a comment