Dim zd As New Dictionary(Of Integer, String) zd.Add(1,"苹果") zd.Add(2,"香蕉") zd.Add(3,"波罗") zd.Add(4,"桔子") zd.Add(5,"桃子") Dim keys(zd.keys.Count) As Integer zd.Keys.CopyTo(keys, 0) For Each k As Integer In Keys '显示所有键及其对应的值 zd(k) = 123456 Output.Show(K & ":" & zd(k)) Next