ASP Exists 메서드
정의와 사용법
Exists 메서드는 Dictionary 객체에서 지정된 key가 존재하는지 여부를 boolean 값으로 반환합니다. 존재하면 true를 반환하며, 없으면 false를 반환합니다。
语法:
DictionaryObject.Exists(key)
参数 | 描述 |
---|---|
key | 必需的。需搜索的 key 值。 |
实例
<% dim d set d=Server.CreateObject("Scripting.Dictionary") d.Add "c"," China" d.Add "i"," Italia" d.Add "s"," Sverige" if d.Exists("c")=true then Response.Write("키가 존재합니다!") else Response.Write("키가 존재하지 않습니다!") end if set d=nothing %>
출력:
키가 존재합니다!