วิธีการคีย์ ASP
❮ การอ้างอิงวัตถุพจนานุกรมที่สมบูรณ์
วิธีคีย์จะส่งกลับอาร์เรย์ของคีย์ทั้งหมดในออบเจ็กต์พจนานุกรม
ไวยากรณ์
DictionaryObject.Keys
ตัวอย่าง
<%
dim d,a,i
set d=Server.CreateObject("Scripting.Dictionary")
d.Add "n","Norway"
d.Add "i","Italy"
d.Add "s","Sweden"
Response.Write("<p>Key values:</p>")
a=d.Keys
for i=0 to d.Count-1
Response.Write(a(i))
Response.Write("<br>")
next
set d=nothing
%>
Output:
Key values:
n
i
s
❮ การอ้างอิงวัตถุพจนานุกรมที่สมบูรณ์