'event': 이벤트는 대리자 형식이어야 합니다.
이벤트 키워드에는 delegate 형식이 필요합니다. 자세한 내용은 이벤트 및 대리자를 참조하세요.
다음 샘플에서는 CS0066을 생성합니다.
// CS0066.cs
using System;
public class EventHandler
{
}
// to fix the error, remove the event declaration and the
// EventHandler class declaration, and uncomment the following line
// public delegate void EventHandler();
public class a
{
public event EventHandler Click; // CS0066
private void TestMethod()
{
if (Click != null)
Click();
}
public static void Main()
{
}
}
GitHub에서 Microsoft와 공동 작업
이 콘텐츠의 원본은 GitHub에서 찾을 수 있으며, 여기서 문제와 끌어오기 요청을 만들고 검토할 수도 있습니다. 자세한 내용은 참여자 가이드를 참조하세요.
.NET