返回键/项目对的数目

代码:

<!DOCTYPE html>

<html>
<body>
<br />
<%
dim d, a, s, i
set d=Server.CreateObject("Scripting.Dictionary")
d.Add "n", "Norway"
d.Add "i", "Italy"
Response.Write("The number of key/item pairs is: " & d.Count)
set d=nothing
%>
<br />
</body>
</html>

结果:

The number of key/item pairs is: 2
相关文章
ASP技巧