Share via


컴파일러 오류 CS0762

업데이트: 2007년 11월

오류 메시지

'method'은(는) 구현 선언이 없는 부분 메서드(Partial Method)이므로 이 메서드로부터 대리자를 만들 수 없습니다.
Cannot create delegate from method 'method' because it is a partial method without an implementing declaration

부분 메서드에는 구현 선언이 있을 필요가 없습니다. 그러나 대리자에서는 캡슐화된 메서드에 구현이 있어야 합니다.

이 오류를 해결하려면

  • 대리자를 초기화하는 데 사용하는 메서드에 구현을 제공합니다.

예제

public delegate void TestDel();

    public partial class C
    {
        partial void Part();

        public static int Main()
        {
            C c = new C();
            TestDel td = new TestDel(c.Part); // CS0762
            return 1;
        }

    }