Generic container

wrzosk dprogr at gmail.com
Sat May 8 15:05:19 PDT 2010


On 08.05.2010 23:52, lurker wrote:
> Hello, first time visiting the newsgroup.
>
> I see in the manual that you can create built-in dictionaries like so:
>
> int[string] foo;
>
> Do you know of a way to store any value in a dictionary? In C# I can do
> something like this:
>
> Dictionary<string, object>  foo;
>
> I need a dictionary that can store any value, indexed by string.
>
> Thanks
Object[string] foo;
foo["aaa"] = new AAA();


More information about the Digitalmars-d-learn mailing list