DictionaryBase

DictionaryBase serializable

System.Collections (mscorlib.dll) abstract class

This abstract base class is used to implement specialized dictionary style collections. Classes derived from DictionaryBase allow for strongly typed key and value pairs. A set of protected instance methods is defined to be overridden by derived classes. These methods allow a class to specify customized processes when functions are performed on the derived object. For example, OnSet( ) lets you perform a function before you set a new element in the dictionary, while OnSetComplete( ) lets you perform a function after a value is set.

 public abstract class  DictionaryBase  : IDictionary, ICollection, IEnumerable {  // Protected Constructors  protected  DictionaryBase  ( );  // Public Instance Properties  public int  Count  {get; }  // implements ICollection   // Protected Instance Properties  protected IDictionary  Dictionary  {get; }    protected Hashtable  InnerHashtable  {get; }  // Public Instance Methods  public void  Clear  ( );  // implements IDictionary  public void  CopyTo  (Array   array   , int   index   );  // implements ICollection  public IDictionaryEnumerator  GetEnumerator  ( );  // implements IDictionary   // Protected Instance Methods  protected virtual void  OnClear  ( );    protected virtual void  OnClearComplete  ( );    protected virtual object  OnGet  (object   key   , object   currentValue   );    protected virtual void  OnInsert  (object   key   , object   value   );    protected virtual void  OnInsertComplete  (object   key   , object   value   );    protected virtual void  OnRemove  (object   key   , object   value   );    protected virtual void  OnRemoveComplete  (object   key   , object   value   );    protected virtual void  OnSet  (object   key   , object   oldValue   , object   newValue   );    protected virtual void  OnSetComplete  (object   key   , object   oldValue   , object   newValue   );    protected virtual void  OnValidate  (object   key   , object   value   ); } 

Subclasses

System.Diagnostics.{InstanceDataCollection , InstanceDataCollectionCollection}



C# in a Nutshell
C # in a Nutshell, Second Edition
ISBN: 0596005261
EAN: 2147483647
Year: 2005
Pages: 963

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net