E
Emilio
Good Morning,
I've the class :
public class GenericOutput
{
public String answer;
public IDictionary<string,string> maincontent;
public GenericOutput()
{
answer = null;
maincontent = null;
}
}
and in another class I have:
GenericOutput op = new GenericOutput();
op.maincontent = new Hashtable();
At this point the complimer give me the error
"Cannot implicitly convert type 'System.Collections.Hashtable' to
'System.Collections.Generic.IDictionary<object,object>'. An explicit
conversion exists (are you missing a cast?) "
Where am i wrong? May you help me?
Thank you,
Emilio
I've the class :
public class GenericOutput
{
public String answer;
public IDictionary<string,string> maincontent;
public GenericOutput()
{
answer = null;
maincontent = null;
}
}
and in another class I have:
GenericOutput op = new GenericOutput();
op.maincontent = new Hashtable();
At this point the complimer give me the error
"Cannot implicitly convert type 'System.Collections.Hashtable' to
'System.Collections.Generic.IDictionary<object,object>'. An explicit
conversion exists (are you missing a cast?) "
Where am i wrong? May you help me?
Thank you,
Emilio