I'm trying to do this with Dictionary, Array seems more general so I'm using it as an example.
Class MyArray
{
private Array array;
public Array [p] // a property
{
get {return array[p]};
set
{
array[p] = value;
more_stuff();
}
}
}
This is sudo-code. I've included only a part of the class, where my problem would be. Can I use a property as above, or another structure to achieve this?
(new MyArray[]{4, 3, 1, 5})[2] = 4;