ASP Dictionary.Remove Method
The ASP Dictionary.Remove Method is used to remove specified key-value pairs from a Dictionary Object.
Syntax:
DictionaryObject.Remove(key)
Parameter Value:
- Key: It is a required attribute. It specifies the key-value pairs that would be removed.
Example Code:
ASP
<%
dim d,a,i
set d=Server.CreateObject( "Scripting.Dictionary" )
d.Add "m" , "mango"
d.Add "z" , "zebra"
d.Add "c" , "cat"
d.Remove( "c" )
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
m
z
Last Updated :
31 Mar, 2021
Like Article
Save Article
Share your thoughts in the comments
Please Login to comment...