Share via


컴파일러 경고(수준 4) CS0028

업데이트: 2007년 11월

오류 메시지

'function declaration'의 시그니처가 잘못되어 진입점이 될 수 없습니다.
'function declaration' has the wrong signature to be an entry point

Main의 메서드 선언이 잘못되었습니다. 잘못된 시그니처로 선언되었습니다. Main은 정적으로 선언해야 하고 int 또는 void를 반환해야 합니다. 자세한 내용은 Main()과 명령줄 인수(C# 프로그래밍 가이드)를 참조하십시오.

다음 샘플에서는 CS0028 경고가 발생하는 경우를 보여 줍니다.

// CS0028.cs
// compile with: /W:4 /warnaserror
public class a
{
    public static double Main(int i)   // CS0028
    // Try the following line instead:
    // public static void Main()
    {
    }
}