"Gavin Sullivan" <ga****@gavinsullivan.co.uk> wrote:
How would you (if you can?) code the following VB.Net in C#?
public interface IDummy
sub SomeMethod()
end interface
public class Dummy
implements IDummy
public sub DifferentName() implements IDummy.SomeMethod
end sub
end class
You can implement an interface with a non-public name that doesn't
conflict with any other name, whether it is inherited or if it comes
from another interface - but you can't give it an arbitrary name. You
can, of course, simply call another method:
---8<---
public interface IDummy
{
void SomeMethod();
}
public class Dummy: IDummy
{
void IDummy.SomeMethod()
{
DifferentName();
}
public void DifferentName()
{
}
}
--->8---
-- Barry
--
http://barrkel.blogspot.com/