我在Start()中收到「無過載需要0個參數」的錯誤。在我的主要方法線。我不知道如何解決這個問題,並且我四處搜尋,找不到任何東西。沒有超載需要'0'參數[c#]
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
public static void main(string[] args)
{
Start();
}
public static string Start(string move)
{
Console.Write("");
string gameType = Console.ReadLine();
if (gameType == "s")
{
Console.Write("");
begin:
Console.Write("\nEnter your move: ");
move = Console.ReadLine();
switch (move)
{
case "r":
Console.Write("s");
Console.ReadLine();
break;
case "s":
Console.Write("");
Console.ReadLine();
break;
case "f":
Console.Write("");
Console.ReadLine();
break;
default:
Console.Write("\nInvalid move, try again\n\n");
goto begin;
}
Console.ReadLine();
return move;
}
else
{
return move;
}
}
static string Genius(string genius, string move)
{
Console.Write(move);
return genius;
}
}
}
替換爲您轉到在[迅猛龍吃掉你]之前的一段時間循環(http://xkcd.com/292/)。 –
好的,我會這樣做的。 –
一般來說,你的第一個程序應該是沿着Hello World的行... – Coeffect