ASP Count 属性

定义和用法

Count 属性返回在 Dictionary 对象中 key/item 对的数量。

语法:
  1. DictionaryObject.Count

实例

  1. <%
  2. dim d
  3. set d=Server.CreateObject("Scripting.Dictionary")
  4. d.Add "c","China"
  5. d.Add "i","Italy"
  6. d.Add "s","Sweden"
  7. Response.Write("The number of key/item pairs: " & d.Count)
  8. set d=nothing
  9. %>

输出:

  1. 键/项对的数量: 3

分类导航