Dictionary(string -> tuple) in .NET 3.5? -


i wondering if there's way create dictionary using anonymous type values.

{     { "first",  {1, true} },     { "second", {2, false} }, } 

i want use in .net 3.5, there's no vanilla implementation of tuple<...> available.

any suggestions?

what use (though ugly , assumptive) is:

dim dict dictionary(of string, object()) dict.add("first", new object() {1, true}) dict.add("second", new object() {2, false}) 

obviously, doesn't provide compiler support type- , bounds-checking tuples, in pinch works.


Comments

Popular posts from this blog

c++ - Convert big endian to little endian when reading from a binary file -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

unicode - Are email addresses allowed to contain non-alphanumeric characters? -