Array overloading is the process of using an object as an array. Some people coming from different language backgrounds may know this ability by another name: indexers.
The material in this chapter will help you learn how to create objects that can have their contents read and manipulated using the standard array syntax.
ArrayAccess interface enables your objects to behave as arrays. It consists of four methods, as listed in Table 12-1.
Table 12-1. ArrayAccess Methods
||Sets an offset for array access. Takes two parameters: an offset to be used as the array index and a value to assign.|
||Gets the associated value given a specified offset. ...|