ASP Keysメソッド
完全な Dictionary オブジェクトのリファレンスマニュアル
Keys メソッドは、Dictionary オブジェクト内のすべてのキーを含む配列を返します。
構文
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
%>
出力:
Key values:
n
i
s
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
%>
出力:
Key values:
n
i
s
完全な Dictionary オブジェクトのリファレンスマニュアル その他の拡張