loop. Without this conversion, it
loop in such a straightforward way.
10
Indexers and Properties
T
his chapter examines two special types of class members that have a close relationship
to each other: indexers and properties. Each expands the power of a class by
enhancing its integration into C#’s type system and improving its resiliency. Indexers
provide the mechanism by which an object can be indexed like an array. Properties offer a
streamlined way to manage access to a class’ instance data. They relate to each other because
both rely upon another feature of C#: the accessor.
Indexers
As you know, array indexing is performed using the
Do'stlaringiz bilan baham: