ASP Count Property

Definition and Usage

The Count property returns the number of key/item pairs in the Dictionary object.

Syntax:

DictionaryObject.Count

Instance

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

Output:

The number of key/item pairs: 3