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

ruby - When to use an ORM (Sequel, Datamapper, AR, etc.) vs. pure SQL for querying -

php - PHPDoc: @return void necessary? -

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