ASP ရှိပြီးသား နည်းလမ်း
❮ ပြီးပြည့်စုံသော Dictionary Object ရည်ညွှန်းချက်
Exists နည်းလမ်းသည် Dictionary object တွင် သတ်မှတ်ထားသော သော့ရှိမရှိညွှန်ပြသော Boolean တန်ဖိုးကို ပြန်ပေးသည်။ သော့ရှိလျှင် အမှန်နှင့် မဟုတ်ပါက false ပြန်လာပါမည်။
အထားအသို
DictionaryObject.Exists(key)
Parameter | Description |
---|---|
key | Required. The key value to search for |
ဥပမာ
<%
dim d
set d=Server.CreateObject("Scripting.Dictionary")
d.Add "n","Norway"
d.Add "i","Italy"
d.Add "s","Sweden"
if d.Exists("n")=true then
Response.Write("Key exists!")
else
Response.Write("Key does not exist!")
end if
set d=nothing
%>
Output:
Key exists!
❮ ပြီးပြည့်စုံသော Dictionary Object ရည်ညွှန်းချက်