logo
  • 教程列表
  • SO官方文檔
  • 字典物件
    • 迭代字典中的所有專案
    • 建立字典並將項新增到字典中
    • 檢查字典中是否存在鍵
    • 從詞典中刪除鍵鍵
    • 從詞典中刪除專案
    • 迭代字典中的所有鍵
  1. StackOverflow 文件
  2. vbscript 教程
  3. 字典物件
  4. 從詞典中刪除鍵鍵

從詞典中刪除鍵鍵

Created: November-22, 2018

set oDic = CreateObject("Scripting.Dictionary")
oDic.add "USA", "United States of America"
oDic.add "UK", "United Kingdom"
oDic.add "CAN", "Canada"

' Delete only if Key exists
If oDic.Exists("UK") Then
    oDic.Remove "UK"
End If    

' Delete all keys from Dictionary
oDic.removeAll 

Set oDic = Nothing
  • 從詞典中刪除專案
  • 檢查字典中是否存在鍵

Copyright © 2018. All right reserved

tastones.com 备案号:鲁ICP备18045372号-1

  • 關於本站
  • 免責聲明