Imports System
Imports System.Linq
Imports System.Collections.Generic
Public Class Program
Public Shared Sub Main()
Dim dict = New Dictionary(Of String, Integer)() From {
{"c#", 2},
{"c++", 5},
{"vb.net", 9},
{"java", 7},
{"c", 1},
{"rust", 3}
}
Dim list As List(Of KeyValuePair(Of String, Integer)) = dict.ToList()
For Each pair In list
Console.WriteLine("{0} : {1}", pair.Key, pair.Value)
Next
End Sub
End Class
' run:
'
' c# : 2
' c++ : 5
' vb.net : 9
' java : 7
' c : 1
' rust : 3
'