最新的Web開發教程
 

ASP Count Property


<完整字典對象參考

Count屬性返回鍵/項目對在Dictionary對象的數量。

句法

DictionaryObject.Count

<%
dim d
set d=Server.CreateObject("Scripting.Dictionary")
d.Add "n","Norway"
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

<完整字典對象參考