Lecture overview -- Keyboard shortcut: 'u'  Previous page: Indexers in C# -- Keyboard shortcut: 'p'  Next page: Example of associating Person with BankAccount -- Keyboard shortcut: 'n'  Lecture notes - all slides together  Annotated slide -- Keyboard shortcut: 't'  Textbook -- Keyboard shortcut: 'v'  Alphabetic index  Help page about these notes  Course home    Data Access, Properties, and Methods - slide 14 : 29

Associative Arrays

An associative array is an array which allows indexing by means of arbitrary objects, not just integers

An associative arrays maps a set of objects (the indexing objects, keys) to another set of objects (the element objects).
a.cs
The class A indexed by a string.
b.cs
A client of A which uses the string indexing of A.
output
Output from Main in class B.
Associative arrays are in C# implemented by means of hashtables in dictionaries