我正在創建一個登錄終端,並且我有一個登錄字符串,所以我想檢查用戶是否正確輸出字符串的名稱,執行以下操作,這裏是代碼:檢查用戶輸入是否=定義的字符串
Console.WriteLine("--------------------");
Console.WriteLine("---LOGIN TERMINAL---");
Console.WriteLine("--------------------");
System.Threading.Thread.Sleep(1000);
Console.WriteLine("/Log In");
Console.WriteLine("/Create New User");
Console.WriteLine("/Delete User");
userInput = Convert.ToString(Console.ReadLine());
if(userInput = LogIn)
{
}
謝謝!我真的忘了,因爲我沒有代碼很長一段時間,謝謝反正! –