vb dictionary对象中的对比解决办法
vb dictionary对象中的对比
假设有两个字典象
a 的值是5,6,7,8,9
b的值是1,2,3,4,5,6,8
两个键相同
我想实现比较 a的值在b里面就msgbox "a" 不在就msgbox "b"如何实现
------解决方案--------------------
For ictr= 0 to Dicta.count-1
if Dictb.Exists(Dicta.items(ictr)) then
msgbox "a"
else
msgbox "b"
end if
next ictr
假设有两个字典象
a 的值是5,6,7,8,9
b的值是1,2,3,4,5,6,8
两个键相同
我想实现比较 a的值在b里面就msgbox "a" 不在就msgbox "b"如何实现
------解决方案--------------------
For ictr= 0 to Dicta.count-1
if Dictb.Exists(Dicta.items(ictr)) then
msgbox "a"
else
msgbox "b"
end if
next ictr