带有文本作为索引的列表或数组?

Ale*_*lex 0 vb.net data-structures

使用vb.net,是否可以有一个值列表,例如:

Green
Black
Blue

和索引是一个文本值,如

Table
Desk
Chair

这样的事情

ListColors("Chair")="Green"
ListColors("Desk")="Blue"
ListColors("Table")="Black"
Run Code Online (Sandbox Code Playgroud)

Thi*_*ter 6

使用Dictionary(Of String, String)对象:http://msdn.microsoft.com/en-us/library/xfhwa508.aspx