K
Kevin Frey
In a derived class I am trying to redefine the implementation of a interface
method defined in a base class - the base class interface method was not
declared virtual.
I have yet to actually test this approach, but it looks ugly. Is there any
better way?
public interface ITest
{
void Func();
}
public class A : ITest
{
void ITest.Func( )
{
// some implementation
}
}
public class B : A, ITest
{
void ITest.Func( )
{
// want to call A's ITest interface
( ( ITest )( A ) this ).Func( );
}
}
method defined in a base class - the base class interface method was not
declared virtual.
I have yet to actually test this approach, but it looks ugly. Is there any
better way?
public interface ITest
{
void Func();
}
public class A : ITest
{
void ITest.Func( )
{
// some implementation
}
}
public class B : A, ITest
{
void ITest.Func( )
{
// want to call A's ITest interface
( ( ITest )( A ) this ).Func( );
}
}