Hashtable.Remove Method


Hashtable.Remove Method

Class

System.Collections.Hashtable

Syntax

     hashtableVariable.Remove(key) 


key (required; any)

The key with the key/value pair that is to be removed

Description

The Remove method removes an element from a hashtable based on its key.

Usage at a Glance

  • If key is not found in the hashtable, the hashtable remains unchanged, and no error occurs.

  • For cases in which you need to know whether the call to the Remove method will actually remove an entry, call the ContainsKey method beforehand to make sure that the key you want to remove exists.

See Also

Hashtable Class




Visual Basic 2005(c) In a Nutshell
Visual Basic 2005 in a Nutshell (In a Nutshell (OReilly))
ISBN: 059610152X
EAN: 2147483647
Year: 2004
Pages: 712

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