public MatrixError(CellCoords[] cells) { //this.Message = Message; Cells = new ArrayList(0); foreach (CellCoords cc in cells) Cells.Add(cc); }
//public void AddCell(int RowIndex, int ColumnIndex) //{ // for (int i = 0; i < Cells.Count; i++) // if ((Cells[i] as CellCoords).ColumnIndex == ColumnIndex && // (Cells[i] as CellCoords).RowIndex == RowIndex) // return; // Cells.Add(new CellCoords(RowIndex, ColumnIndex)); //} //public void RemoveCell(int RowIndex, int ColumnIndex) //{ // for (int i = 0; i < Cells.Count; i++) // if ((Cells[i] as CellCoords).ColumnIndex == ColumnIndex && // (Cells[i] as CellCoords).RowIndex == RowIndex) // { // Cells.RemoveAt(i); // return; // } //} public bool ContainsCell(CellCoords cell) { foreach (object cc in Cells) if (cell.Equals(cc)) return true; return false; }