So I have this two dimensional array in my class, and I'm trying to create an accessor group for it. But the compiler doesn't like what I'm trying to do at all.
private int[,] _resource = new int[5, 2];
public int Resource[int idx1, int idx2]
{
get
{
return _resource[idx1,idx2];
}
set
{
_resource[idx1,idx2] = value;
}
}
Not possible, or what am I doing wrong?
I want to put () somewhere in that code, but then that defeats the entire purpose of what I'm trying to do. :P