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
for i=0 to d.Count-1
  Response.Write(a(i))
  Response.Write("<br />")
next
set d=nothing
%>

출력:

키 값:
c
i
s