IR Framework

Dictionary.Exists Method

Returns true if a specified key exists in the Dictionary object, false if it does not.
object.Exists (key)

Arguments

object
Required. Always the name of a Dictionary object.


key
Required. Key value being searched for in the Dictionary object.



Remarks

An error occurs if the key already exists.

The following example illustrates the use of the Exists method.

function keyExists(strKeyToFind)
{
   var d, s = "";
   d = new Application.Dictionary();
   d.Add("a", "Athens");
   d.Add("b", "Belgrade");
   d.Add("c", "Cairo");
   if (d.Exists(strKeyToFind))
      s += "Specified key exists.";
   else 
      s += "Specified key doesn't exist.";
   return(s);
}


Applies To:

Dictionary Object



Requirements