© { JSL }
104
[ ]
·
indexers provide [ ] like syntax of use
w
always an instance member, can be
virtual
w
no
ref
-
out
parameters
w
can be overloaded
class
DoubleArray
{
...
public double this
[
int
index]
{
...
}
...
}
an indexer
is not an
operator
DoubleArray marks;
...
marks[2] = 34.29;
...
if
(marks[0] > 42.0) ...
no
parentheses
this is a
keyword