ASP Exists మాథోడ్
నిర్వచనం మరియు వినియోగం
Exists మాథోడ్ డిక్షనరీ ఆబ్జెక్ట్లో కొన్ని key ఉన్నాదా బుల్ విలువను తిరిగి ఇస్తుంది. ఉన్నది ఉంటే true తిరిగి ఇస్తుంది, లేకపోతే false తిరిగి ఇస్తుంది.
సింథెక్సిస్:
DictionaryObject.Exists(key)
పారామీటర్స్ | వివరణ |
---|---|
key | అవసరమైనది. శోధించవలసిన key విలువ. |
ప్రతిస్పందన
<% dim d set d=Server.CreateObject("Scripting.Dictionary") d.Add "c","చైనా" d.Add "i","ఇటలీ" d.Add "s","స్వీడన్" if d.Exists("c")=true then Response.Write("Key exists!") else Response.Write("Key does not exist!") end if set d=nothing %>
输出:
Key exists!