SourceGrid.CellCollection.Add C# (CSharp) Method

Add() public method

Adds an instance of type Cells.ICellVirtual to the end of this CellBaseCollection.
public Add ( Cells value ) : void
value Cells /// The Cells.ICellVirtual to be added to the end of this CellBaseCollection. ///
return void
        public virtual void Add(Cells.ICellVirtual value)
        {
            this.List.Add(value);
        }

Usage Example

Beispiel #1
0
        /// <summary>
        /// Returns the union of all the selected range as Position collection
        /// </summary>
        /// <returns></returns>
        public virtual CellCollection GetCells()
        {
            CellCollection     cells       = new CellCollection();
            PositionCollection l_Positions = GetCellsPositions();

            for (int i = 0; i < l_Positions.Count; i++)
            {
                cells.Add(m_Grid.GetCell(l_Positions[i]));
            }

            return(cells);
        }