开发者

How to fill Dictionary(Of TKey, TValue) directly in VB.NET

is there any way to do the same in VB.NET?

Dictionary<int, string> myDict = new Dictionary<int, string>()     
{        
     { 2, "This" },    
     { 1, "is" },          
     { 5, "radio" 开发者_C百科},      
     { 12, "clash" },     
};


As stated in Marcel's comment above:

Dim myDict As New Dictionary(Of Integer, String) From _
        {{1, "one"}, {2, "two"}, {3, "three"}}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜