テキストボックスに質問を表示するプロジェクトに取り組んでいます。それらのそれぞれの下に 4 つのチェックボックスがあり、ユーザーは質問に答えるものを選択する必要があります。
すべての質問、回答などを .txt ファイルに入れて、そこから読み込む方法はありますか? case
質問ごとに書く必要はありません(約120の質問があります)。
これまでの私のやり方:
case 5: // Multiple Answers
txtQuestion.Text = "What are the characteristics of the " +
"Main method? (Choose two)";
grpSingleChoice.Visible = false;
grpMultipleChoice.Visible = true;
chkAnswer1.Text = "A. It must always return void";
chkAnswer2.Text = "B. It is always the first method inside the " +
"main class of a program";
chkAnswer3.Text = "C. It is the start and end point of a program";
chkAnswer4.Text = "D. It must always be passed an array of strings " +
"as in static void Main(string[] args)";
chkAnswer5.Visible = true;
chkAnswer5.Text = "E. It must be created inside of a class" +
"or a structure";
break;