ASP RemoveAll 方法

定义和用法

RemoveAll 方法从一个 Dictionary 对象中删除所有的 key/item 对。

语法:
  1. DictionaryObject.RemoveAll

实例

  1. <%
  2. dim d,a,i
  3. set d=Server.CreateObject("Scripting.Dictionary")
  4. d.Add "c","China"
  5. d.Add "i","Italy"
  6. d.Add "s","Sweden"
  7. d.RemoveAll
  8. Response.Write("<p>键值:</p>")
  9. a=d.Keys
  10. for i=0 to d.Count-1
  11. Response.Write(a(i))
  12. Response.Write("<br />")
  13. next
  14. set d=nothing
  15. %>

输出:

  1. 键值:

分类导航