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
Post a Comment