ASP Count-Attribut

Definition und Verwendung

Das Count-Attribut gibt die Anzahl der key/item-Paare im Dictionary-Objekt zurück.

Syntax:

DictionaryObject.Count

Instanz

<%
dim d
set d=Server.CreateObject("Scripting.Dictionary")
d.Add "c","China"
d.Add "i","Italien"
d.Add "s","Schweden"
Response.Write("Die Anzahl der Schlüssel/Eintrag-Paare: " & d.Count)
set d=nothing
%>

Ausgabe:

Die Anzahl der Schlüssel/Eintrag-Paare: 3