음을 고려한 인터페이스의 기본 구현 TestMethod
public interface TestInterface
{
public int TestMethod()
{
return 15;
}
}
전화 TestMethod
에서 다음과 같은 클래스의 원인이됩니다 StackOverflowException:
public class TestClass : TestInterface
{
public int TestMethod()
{
return 1 + (this as TestInterface).TestMethod();
}
}
지금 왜 이것은,그러나 방법은 없을 얻을 수 있습니다. 뭔가 base.TestMethod()
참조에 대한 하나의 클래스의 인터페이스 구현?
난로 변경할 수 있습 방법에 TestInterface 에서 참조 TestClass 는 방법이지만,에 문제가 발생하지 않는 다른 클래스가 필요하지 않을 참조 기본 구현입니다.