[RESOLVED] Problem in casting interface
class IAList:ICollectionSomething
{
...
}
class AList:IAList
{
...
}
class IBList:IAList
{
...
}
class BList:AList,IBList
{
...
}
and I use this class in this way:
class InterfaceA:ISomething
{
IAList Load(string s);
}
class A:InterfaceA
{
public IAList Load(string s)
{
...
}
}
class InterfaceB:InterfaceA
{
new IBList Load(string s);
}
class B:A,InterfaceB
{
public new IBList Load(string s)
{
return base.Load(s) as IBList
}
}
The problem is here:
public new IBList Load(string s)
{
return base.Load(s) as IBList
}
You can see here I have a load function that return IAList in my base class and I want to cast it to IBList, but it always return null.
I don`t know what is wrong with this. Can you help me to solve this problem?

