setMembership

setMembership(type: Class) updating;

The setMembership method of the DynaDictionary class sets the membership (that is, the base type for members) of the dynamic dictionary.

Before the setMembership method is called, the collection must be empty; that is, it cannot contain data. If this precondition is violated, the appropriate system exception is raised. This method implicitly calls the clearKeys method.

Dynamic dictionaries can have object members only; that is, these dictionaries cannot have primitive type membership.

For an example of the use of this method, see "Using Dynamic Dictionaries", later in this chapter.