Remove

          Method 
          Member of  Multi.Dictionary 

Description
Removes a key and item pair(s) from the Dictionary object.
Syntax
Dictionary.Remove (Key as String)
 
Where Type Optional Default Description
 Key  String     Key associated with the item being removed from Multi.Dictionary 
Remarks
Multi.Dictionary.Remove removes
- No keys/pairs if Key does not exists in the Multi.Dictionary object
- One Key and its pair value if Key exists and Multi.Dictionary.UniqueKeys is true.
- One Key and all associated values if Key exists and Multi.Dictionary.UniqueKeys is false.
Examples
 Remove method sample - nonunique keys  
  Dim D As New Multi.Dictionary
  
  D.UniqueKeys = False
  D("Martin") = 3812
  D("Alex") = 2534
  D("Alex") = 2535
  D("Peter") = 12
  
  'There are 3 keys / 4 items in the dictionary
  Debug.Print D.KeysCount, D.Count
  
  'Remove One key - one pair.
  D.Remove "Martin"
  'There are 2 keys / 3 items in the dictionary
  Debug.Print D.KeysCount, D.Count
  
  'Remove One key - two pairs.
  D.Remove "Alex"
  'There are 1 key / 1 item in the dictionary
  Debug.Print D.KeysCount, D.Count
  Other links for Remove
Methods of Dictionary class
Properties of Dictionary class
Free threaded dictionary object. Lets you work with unique/non-unique keys, any VARIANT values and connect to other dictionary in the same process.
     Dictionary is a COM class specially designed as a free-threaded dictionary in Application scope of ASP/ASP.Net pages. It also works with script other engines in VB Script and JScript (ASP,ASP.Net, WSH, CHM, HTA), VB Net, Visual basic (VBA - VB 5, VB 6, Word, Excel, Access, …), C#, J#, C++, ASP, ASP.Net, Delphi and with T-SQL OLE functions - see Use ByteArray object article. You can also use the object in other programming environments with COM support, such is PowerBuilder.
     Source code for Dictionary is available within distribution license, please see License page for Multi Dictionary or License page for ScriptUtilities and Huge ASP file upload.
Multithreaded dictionary object. Lets you work with unique/non-unique keys in VBA/VBS/ASP/WHS envinronment (share application/session variables in ASP)

© 1996 – 2005 Motobit Software, help{at}pstruh.cz, help v. 2.16.14