Name
DictionaryBase
Synopsis
This MustInherit
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 MustInherit Class DictionaryBase : Implements IDictionary, ICollection, IEnumerable ' Protected Constructors Protected Sub New() ' Public Instance Properties Public ReadOnly Property Count As Integer Implements ICollection.Count ' Protected Instance Properties Protected Property Dictionary As IDictionary Protected Property InnerHashtable As Hashtable ' Public Instance Methods Public Sub Clear() Implements IDictionary.Clear Public Sub CopyTo(ByVal array As Array, ByVal index As Integer) Implements ICollection.CopyTo Public Function GetEnumerator( ) As IDictionaryEnumerator Implements IDictionary.GetEnumerator ' Protected Instance Methods Overridable Protected Sub OnClear() Overridable Protected Sub OnClearComplete() Overridable Protected Function OnGet(ByVal key As Object, ByVal currentValue As Object) As Object Overridable Protected Sub OnInsert(ByVal key As Object, ByVal value As Object) Overridable Protected Sub
Get VB.NET Core Classes in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.