public ArrayElement GetItemLocation(int index) { ArrayElement point; if (index < 0 || index >= m_Items.Length) { throw new IndexOutOfRangeException("Index is out of range"); } point = new ArrayElement(); point.Row = index / this.ArraySize.Cols; point.Col = index - (point.Row * this.ArraySize.Rows); return(point); }
public int GetItemIndex(ArrayElement point) { return(this.GetItemIndex(point.Row, point.Col)); }
public T this[ArrayElement location] { get { return(this[location.Row, location.Col]); } set { this[location.Row, location.Col] = value; } }