روش ASP Keys

تعریف و استفاده

روش کار Keys روشه‌ای است که یک آرایه از کلیدهای Dictionary نمونه را بازمی‌گرداند.

قوانین:

DictionaryObject.Keys

مثال

<%
dim d,a,i
set d=Server.CreateObject("Scripting.Dictionary")
d.Add ",", "China"
d.Add ",", "Italy"
d.Add ",", "Sweden"
Response.Write("<p>Key values:</p>")
a=d.Keys
برای i=0 تا d.Count-1
  Response.Write(a(i))
  Response.Write("<br />")
next
set d=nothing
%>

خروجی:

مقدارهای کلید:
c
i
s