The use of Exists method in VBS
This article introduces the relevant knowledge of "the use of Exists method in VBS". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
Returns True; if the specified key exists in the Dictionary object, or False if it does not exist.
Object.Exists (key)
Parameter object
Required. Always Dictionary object name.
Key
Required. The Key value found in the Dictionary object.
Description
The following example illustrates how to use the Exists method:
Function KeyExistsDemo Dim d, msg 'create some variables. Set d = CreateObject ("Scripting.Dictionary") d.Add "a", "Athens" 'add some keys and items. D.Add "b", "Belgrade" d.Add "c", "Cairo" If d.Exists ("c") Then msg = "the specified key exists." Else msg = "the specified key does not exist." End If KeyExistsDemo = msgEnd Function, "the use of the Exists method in VBS" ends here. Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!