Hi there
The following code doesn't complie:
_______________ _______________ _______________ ___________
public interface ITree
{
ITree GetFather ();
List<ITreeGetCh ildren();
}
public class A : ITree
{
protected A m_father;
protected List<Am_ListChi ldren;
public ITree GetFather() { return m_father; }
public List<ITreeGetCh ildren() { return m_ListChildren; }
}
_______________ _______________ _______________ ___________
since "Error 2 Cannot implicitly convert type
'System.Collect ions.Generic.Li st<XMLTreeview. A>' to
'System.Collect ions.Generic.Li st<XMLTreeview. ITree>'
However A inherits from ITree, so the cast should be working no...
Is there any workaround ?
Oriane
The following code doesn't complie:
_______________ _______________ _______________ ___________
public interface ITree
{
ITree GetFather ();
List<ITreeGetCh ildren();
}
public class A : ITree
{
protected A m_father;
protected List<Am_ListChi ldren;
public ITree GetFather() { return m_father; }
public List<ITreeGetCh ildren() { return m_ListChildren; }
}
_______________ _______________ _______________ ___________
since "Error 2 Cannot implicitly convert type
'System.Collect ions.Generic.Li st<XMLTreeview. A>' to
'System.Collect ions.Generic.Li st<XMLTreeview. ITree>'
However A inherits from ITree, so the cast should be working no...
Is there any workaround ?
Oriane
Comment