Visual Basic Scripting Edition | 語言參考 |
Dictionary 保存數(shù)據(jù)鍵和項目對的對象。 說明Dictionary 對象與 PERL 關(guān)聯(lián)數(shù)組是等價的。項目(可以是任何形式的數(shù)據(jù))被保存在數(shù)組中。每項都與唯一的鍵相關(guān)聯(lián)。鍵值用于檢索單個項目,通常是整數(shù)或字符串,但不能為數(shù)組。 下面代碼示范如何創(chuàng)建 Dictionary 對象: Dim d ' 創(chuàng)建一個變量。
Set d =CreateObject("Scripting.Dictionary") d.Add "a", "Athens" ' 添加鍵和項目。
d.Add "b", "Belgrade" d.Add "c", "Cairo" ...
屬性CompareMode 屬性 | Count 屬性 | Item 屬性 | Key 屬性 方法Add 方法(Dictionary) | Exists 方法 | Items 方法 | Keys 方法 | Remove 方法 | RemoveAll 方法 請參閱FileSystemObject 對象 | TextStream 對象 返回首頁 |