namespace com.azkoss.excellite { using System; using System.Reflection; /// ///Collection of excel cells (ExcelCell). /// /// public class ExcelCellCollection : ExcelRowColumnCellCollectionBase { // Methods internal ExcelCellCollection(ExcelWorksheet parent) : base(parent) { } internal ExcelCellCollection(ExcelWorksheet parent, ExcelCellCollection sourceCells) : base(parent) { foreach (ExcelCell cell1 in sourceCells) { base.Items.Add(new ExcelCell(base.Parent, cell1)); } } private void AdjustArraySize(int index) { if (index > (base.Items.Count - 1)) { ExcelColumnCollection.ExceptionIfColumnOutOfRange(index); int num2 = index - (base.Items.Count - 1); for (int num1 = 0; num1 < num2; num1++) { base.Items.Add(new ExcelCell(base.Parent)); } } } // Properties /// ///Gets the cell with the specified index. /// ///The zero-based index of the cell. public ExcelCell this[int index] { get { this.AdjustArraySize(index); return (ExcelCell) base.Items[index]; } } } }