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" },
{ 12, "clash" },
};
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" },
{ 12, "clash" },
};
As stated in Marcel's comment above:
Dim myDict As New Dictionary(Of Integer, String) From _
{{1, "one"}, {2, "two"}, {3, "three"}}