編譯器警告 (層級 4) CS0028
更新:2007 年 11 月
錯誤訊息
「函式宣告」使用錯誤的簽章做為進入點
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()
{
}
}