You can't just cast a generic dictionary with a different key data type. You
can however create the second dictionary, copy the original keys to an int
using the Keys.CopyTo method, go through them and populate the new
dictionary with the old data.
Stanimir Stoyanov | www.stoyanoff.info
"pierre.k" <petr.krebs@xxxxxx> wrote in message
> how can I do a cast like
> IDictionary<int, string> as IDictionary<object, string> ?
> Thanks in advance for your help,