我有这三本词典
dictLibraries.Add("SVSU", "Zahnow Library")
dictLibraries.Add("BR", "Fleschner Memorial Library")
dictLibraries.Add("SDJ", "Scott D. James Technical Repository")
dictBooks.Add("101", "Zen and the Art of Appliance Wiring")
dictBooks.Add("102", "Interpretive Klingon Poetry")
dictBooks.Add("103", "Doing More With Less - Navel Lint Art")
dictBooks.Add("104", "Data Structures for Fun and Profit")
dictBooks.Add("105", "Programming with the Bidgoli")
dictMedia.Add("201", "CD - IEEE Computer: the Hits")
dictMedia.Add("202", "DVD - The Pirates of Silicon Valley")
dictMedia.Add("203", "DVD - Databases and You: the Video Experience")
然后我想制作另一本字典
Public mynesteddict As New Dictionary(Of String, Dictionary(Of String, String))
在这本词典中我想要" SVSU",dictboooks(" 101"," Zen和家电布线艺术")
我该怎么做
答案 0 :(得分:1)
dictbooks
(dictbooks_1
),然后将值添加到mynesteddict
Dim mynesteddict As New Dictionary(Of String, Dictionary(Of String, String))
Dim dictBooks_1 As New Dictionary(Of String, String)
dictBooks_1.Add("101", dictBooks("101"))
mynesteddict.Add("SVSU", dictBooks_1)