Get Hashtable Object Directly

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • John E

    Get Hashtable Object Directly

    Is there any way to directly get the object stored in a hashtable simply by
    using the key (without implementing an Enumerator)?


  • Nicholas Paldino [.NET/C# MVP]

    #2
    Re: Get Hashtable Object Directly

    John E,

    Yes, you will use the indexer, like so:

    // Get the object using the key.
    object pobjValue = mobjHashtable[pobjKey];

    Hope this helps.


    --
    - Nicholas Paldino [.NET/C# MVP]
    - nick(dot)paldin o=at=exisconsul ting<dot>com

    "John E" <La-la-land@hotmial.co m> wrote in message
    news:bm107p$gnt 8r$1@ID-83837.news.uni-berlin.de...[color=blue]
    > Is there any way to directly get the object stored in a hashtable simply[/color]
    by[color=blue]
    > using the key (without implementing an Enumerator)?
    >
    >[/color]


    Comment

    Working...