I want to create a Dim Dict As New Dictionary(Of String, Object)
which would point my strings to specific COM Object classes, i.e. Dict.Add("NODES",Visum.Net.Nodes)
I'd have around 20 keys in dictionary, each pointing to a different class within COM object.
Basically it works, but I'm afraid it's very heavy (dict of 20 instances of big classes) and not neccessary - I'm passing whole object to a dict, while I really need just kind of pointer (ByRef
).
Is there a more clever way to do it?
PS. Why I do it? Because all objects which I'd put inside the dictionary have common methods. This way I'd be able to call i.e. : Dict("Nodes").ItemByKey(13)
, and then Dict("Links").ItemByKey(13)
, etc.
Thanks in advance Rafal