I want to inherit from some kind of array/vector/list class so that I can add just one extra specialized method to it.... something like this:
public class SpacesArray : ArrayList<Space>
{
public Space this[Color c, int i]
{
get
{
return this[c == Color.White ? i : this.Count - i - 1];
}
set
{
this[c == Color.White ? i : this.Count - i - 1] = value;
}
}
}
But the compiler won't let me. Says
The non-generic type 'System.Collections.ArrayList' cannot be used with type arguments
How can I resolve this?