在程序上运行Windows应用程序时出现以下错误。有人可以帮忙吗?
Error: Program 'C:\Users\Owner\Documents\Visual Studio 2008\Projects\Project1\Integer Division\Integer Division\obj\Debug\Integer Division.exe' does not contain a static 'Main' method suitable for an entry point Integer Division
最佳答案
您需要具备以下条件:
static void Main()
{
}
如果您想“运行”某个东西,则需要一个主电源。这基本上是主要功能,因为名称暗示了程序将在何处运行。您应该查找其中包含main()的任何类示例,然后将您的代码放入其中(用于整数除法的代码?)。
关于c# - “does not contain a static '主要' method”错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14018681/