- Home /
Question by
Metalcoder · Oct 05, 2013 at 11:24 AM ·
reference assemblies
HashTable could not be found
I am using System.Collections
, and yet, when I try to use a HashTable, Unity complains about that:
error CS0246: The type or namespace name `HashTable' could not be found. Are you missing a using directive or an assembly reference?
My setup is Unity 4.1 on Windows 7 x64. Anyone knows how can I use HashTable? I don't want to build my own just to avoid this...
Comment
Not sure why it can't find hashtable, but in any case I'd suggest that you use a generic Dictionary ins$$anonymous$$d - much more powerful and also type safe.
using System.Collections.Generic;
Best Answer
Answer by Jamora · Oct 05, 2013 at 11:38 AM
The class name is Hashtable, not HashTable.
I, too, recommend using the Dictionary class.