Share via


컴파일러 오류 CS0470

업데이트: 2007년 11월

오류 메시지

'method' 메서드는 'type' 형식의 인터페이스 접근자 'accessor'을(를) 구현할 수 없습니다. 인터페이스를 명시적으로 구현하십시오.
Method 'method' cannot implement interface accessor 'accessor' for type 'type'. Use an explicit interface implementation.

이 오류는 접근자에서 인터페이스를 구현하려고 하는 경우에 발생합니다. 인터페이스를 명시적으로 구현해야 합니다.

예제

다음 샘플에서는 CS0470 오류가 발생하는 경우를 보여 줍니다.

// CS0470.cs
// compile with: /target:library

interface I
{
   int P { get; }
}

class MyClass : I
{
   public int get_P() { return 0; }   // CS0470
   public int P2 { get { return 0;} }   // OK
}