基本上我正在用 C# 制作一個(gè)劊子手游戲,但問題是每當(dāng)我試圖用它來表達(dá)我的string意思char[]時(shí)word.ToCharArray();它都不起作用。有人可以弄清楚這段代碼有什么問題嗎?List<string> words = new List<string>();List<string> guessedLetters = new List<string>();string word = "sword";// Turning word into char arraychar[] letters = word.ToCharArray(); CS0236 字段初始值設(shè)定項(xiàng)不能引用非靜態(tài)字段、方法或?qū)傩?'Form1.word' final C:\Users*\Desktop\final\final\Form1.cs 20 Active
- 3 回答
- 0 關(guān)注
- 167 瀏覽
添加回答
舉報(bào)
0/150
提交
取消