ASP Remove Method
Definition and Usage
The Remove method deletes the specified key/item pair from the Dictionary object.
Syntax:
DictionaryObject.Remove(key)
Parameter | Description |
---|---|
key | Required. Associated with the key/item to be removed. |
Instance
<% dim d,a,i set d=Server.CreateObject("Scripting.Dictionary") d.Add "c","China" d.Add "i","Italy" d.Add "s","Sweden" d.Remove("s") Response.Write("<p>Key values:</p>") a=d.Keys for i=0 to d.Count-1 Response.Write(a(i)) Response.Write("<br />") next set d=nothing %>
Output:
Key values: c i