How to insert values into VB.NET Dictionary on instantiation?

If using Visual Studio 2010 or later you should use the FROM keyword like this: Dim days = New Dictionary(Of Integer, String) From {{0, “string”}, {1, “string2”}} See: http://msdn.microsoft.com/en-us/library/dd293617(VS.100).aspx If you need to use a prior version of Visual Studio and you need to do this frequently you could just inherit from the Dictionary class … Read more