C#メモ

public int this[int index]
{
    get {return (int) values[index];}
    set {return values[index] = value;}
}

public Foo this[string key]
{
    get {return values[key];}
    set {return values[key] = value;}
}