컴파일러 경고(수준 2) CS0114

업데이트: 2007년 11월

오류 메시지

'function1'은(는) 상속된 'function2' 멤버를 숨깁니다. 현재 메서드가 해당 구현을 재정의하도록 하려면 override 키워드를 추가하십시오. 그렇지 않으면 new 키워드를 추가하십시오.
'function1' hides inherited member 'function2'. To make the current method override that implementation, add the override keyword. Otherwise add the new keyword.

클래스의 선언이 기본 클래스의 선언과 충돌하여 해당 기본 클래스 멤버를 숨깁니다.

자세한 내용은 base를 참조하십시오.

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

// CS0114.cs
// compile with: /W:2 /warnaserror
abstract public class clx
{
   public abstract void f();
}

public class cly : clx
{
   public void f() // CS0114, hides base class member
   // try the following line instead
   // override public void f()
   {
   }

   public static void Main()
   {
   }
}