Bryce Marshall
9/21/2002 9:43:00 PM
I assume you are using C#? Anyway, yes, you are missing something. The
"property" described as Item in the documentation is in fact an Indexer.
From the SDK documentation:
"Indexers allow you to index a class or a struct instance in the same way as
an array".
One key way that an indexer differs from a property is that whilst a
property is identified by its name, an indexer is identified by its
signature.
Therefore:
value = myCollection.Item[key] // Incorrect
value = myCollection[key] // Correct
Hope this helps,
Regards,
Bryce Marshall
"decrypted" <decrypted@earthlink.net> wrote in message
news:#THTxASYCHA.2456@tkmsftngp09...
> Hey All,
> I want a Dictionary/Hashtable with a way to call a method, supply the
> key, and get the value. The documentation states that all the dictionary
> style classes have an Item property capable of taking a key and returning
> the associated value.....buut these props don;t actualy exists in any
> Dictionary style classes....
> I have an ugly ass work around of gertting the enumeration and running
> through it until my key matches a key, thus pulling the value....but that
is
> crap. Am i missing something here?
>
> cheers
> -dec
>
>