ASP RemoveAll 方法

2018-09-14 12:25 更新

ASP RemoveAll 方法


Dictionary 對(duì)象參考手冊(cè) 完整的 Dictionary 對(duì)象參考手冊(cè)

RemoveAll 方法從 Dictionary 對(duì)象中刪除所有的 key/item 對(duì)。

語(yǔ)法

DictionaryObject.RemoveAll

實(shí)例

<%
dim d,a,i
set d=Server.CreateObject("Scripting.Dictionary")
d.Add "n","Norway"
d.Add "i","Italy"
d.Add "s","Sweden"

d.RemoveAll

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
%>

輸出:

Key values:

(nothing)


Dictionary 對(duì)象參考手冊(cè) 完整的 Dictionary 對(duì)象參考手冊(cè)
以上內(nèi)容是否對(duì)您有幫助:
在線筆記
App下載
App下載

掃描二維碼

下載編程獅App

公眾號(hào)
微信公眾號(hào)

編程獅公眾號(hào)