© { JSL }
106
Folded Corner:
Text Box: get or set
get or set
Folded Corner:
·an indexer with no set accessor
wis a read-only indexer
·and indexer with no get accessor
wis a write-only indexer
class Hand
{
    ...
    public Card this [int index]
    {  
        get { return ... }
    }
}
void Cheat(Hand current)
{
    Card ace = MakeAce(Suit.Spades);
    ...
    current[0] = ace;
}
compile time error