469,927 Members | 1,859 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,927 developers. It's quick & easy.

Sorting a hashtable - please help!!

H ieveryone,

Can you help me please? I am trying to sort a hashtable but get the
error: "Cannot implicity convert type void to
System.Collections.ArrayList"

I am doing the following:
****BEGIN CODE****
public ArrayList SomeMethod()
{
Hashtable myHT = new HashTable();

ArrayList keys = GetKeys (HT);

return keys.sort();
}
//Return an arraylist of Hashtable keys
public ArrayList GetKeys(Hashtable table)
{
return (new ArrayList(table.Keys));
}
****END CODE****
However under the "keys.Sort()" method call I get the error: "Cannot
implicity convert type void to System.Collections.ArrayList"

I'm stuck. Would greatly appreciate any comments/suggestions/
corrections that you may be able to offer.

Thanking you,
Al.
Oct 16 '08 #1
1 1043
This is a duplicate; see my reply to your earlier post.
Oct 16 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by vertigo | last post: by
2 posts views Thread by Aric Levin | last post: by
6 posts views Thread by Fred Morrison | last post: by
4 posts views Thread by Ambica Jain | last post: by
3 posts views Thread by NagarajanS | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.