1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- using System;
- using System.Collections.Generic;
- using System.Text;
- using System.Collections;
- using Biff8Excel.Interfaces;
- namespace Biff8Excel.Excel
- {
- public class ExcelCellDictionary : DictionaryBase, IDisposable
- {
- public void Add(string key, ExcelCell cell)
- {
- this.Dictionary.Add(key, cell);
- }
- public int Count
- {
- // used when retrieving the number of elements in the
- // collection. Syntax: Debug.Print x.Count
- get { return this.Dictionary.Count; }
- }
- public ExcelCellDictionary()
- {
- }
- public ExcelCell this[string key]
- {
- set
- {
- this.Dictionary[key] = value;
- }
- get
- {
- //return this.Dictionary[key] as ExcelCell;
- return this.Dictionary[key] as ExcelCell;
- }
- }
- public void Remove(string vntIndexKey)
- {
- // used when removing an element from the collection
- // vntIndexKey contains either the Index or Key, which is why
- // it is declared as a Variant
- // Syntax: x.Remove(xyz)
- this.Dictionary.Remove(vntIndexKey);
- }
- public void CopyTo(ExcelCell[] excelcells, int index)
- {
- this.Dictionary.Values.CopyTo(excelcells, index);
- }
- #region IDisposable ³ÉÔ±
- public void Dispose()
- {
- }
- #endregion
- }
- }
|