Hi I am getting error Error 1 Cannot implicitly convert type 'object' to 'string'. An explicit conversion exists (are you missing a cast?).Error is at the line string def = hash[elem.Word];.Can anyone help me with this .
Thanks
public Hashtable AllWords()
{
Hashtable hash = new Hashtable();
SimpleFrenchEnglishDictionary arr = GetList();
for (int i = 0; i < arr.Count; i++)
{
SimpleFrenchEnglishEntry elem =(SimpleFrenchEnglishEntry) arr[i];
if (hash.Contains(elem.Word) == true)
{
string def = hash[elem.Word];
def += "/r/n" + elem.Definition;
}
else
hash.Add(elem.Word, elem.Definition);
}
return hash;
}