Dictionary Class

The Dictionary class and its associated subclasses encapsulate the behavior required to store and retrieve objects in a collection by a user-defined key or keys.

Mapped properties (that is, properties that have a mapping method) from a RootSchema class cannot be used as dictionary keys. In a dictionary that allows duplicate keys, entries are inserted in <key><oid> order. Duplicate key entries therefore occur in object creation order within instances of the same class. If you have subclasses included in your collection, the order within the dictionary is not necessarily in strict creation order but in creation order within the instances of each subclass.

If you are using entity names (for example, a schema, class, or property name) in dictionary keys, you must consider the size of your dictionary key, as entity names can have a length of up to 100 characters and the total size of the key cannot exceed 512 key units. A key unit is a byte for any non‑character data type, or one character for any character data type; that is, key sizes are string‑encoding agnostic. Key sizes also must allow for a null character to terminate any strings; characters are not null‑terminated.

For details about subscript operators in dictionaries, string keys in dictionary methods, and the methods defined in the Dictionary class, see "Using Subscripts in Dictionaries", "Using String Keys in Dictionary Methods", and "Dictionary Methods", in the following subsections.

Btree

DynaDictionary, ExtKeyDictionary, MemberKeyDictionary