cast sortedlist value as hashtable

F

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!
 
L

Larry Lard

fizzy said:
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 :)
 
J

janine

cannot believe i missed that one!! i'm so stupid - but thanks for not
saying so larry :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top