August 2001
Intermediate to advanced
656 pages
18h 5m
English
Hashtable.Remove Method
System.Collections.Hashtable
hashtablevariable.Remove(key)
hashtablevariable
Use: Required
Data Type: Hashtable object
A reference to a Hashtable object
key
Use: Required
Data Type: Object
The key whose key/value pair is to be removed
None
Removes an element from a hash table
If key is found in the hash table, the
member is removed, and the Count property is decreased by one.
If key is not found in the hash table, the
hash table remains unchanged, and no exception is thrown.
For cases in which you need to know whether the call to the Remove method has actually removed a key, you can call the ContainsKey method beforehand to make sure that the key you want to remove actually exists.
Read now
Unlock full access