Home All Groups Group Topic Archive Search About

cast sortedlist value as hashtable

Author
7 Apr 2005 12:36 PM
fizzy
i have a sortedlist.
its values are hashtables.

i need to access one of these hashtables:

using option strict without a cast, i got a late binding error :

mysortedlist("key")

when i try to cast it:

directcast(mysortedlist("key"), "hashtable") or
ctype(mysortedlist("key"),"hashtable")

i get an error "type expected"

what is the correct way to perform the case? can anyone help?
thanks in advance!

Author
7 Apr 2005 12:43 PM
Larry Lard
fizzy wrote:
Show quoteHide quote
> i have a sortedlist.
> its values are hashtables.
>
> i need to access one of these hashtables:
>
> using option strict without a cast, i got a late binding error :
>
> mysortedlist("key")
>
> when i try to cast it:
>
> directcast(mysortedlist("key"), "hashtable") or
> ctype(mysortedlist("key"),"hashtable")
>
> i get an error "type expected"
>
> what is the correct way to perform the case? can anyone help?

You are almost there!

directcast(mysortedlist("key"), HashTable)

No quotes :)

--
Larry Lard
Replies to group please
Author
7 Apr 2005 12:47 PM
janine
cannot believe i missed that one!! i'm so stupid - but thanks for not
saying so larry :)