13 個のテキスト ボックスから配列の 13 個の要素に項目を追加したいと考えています。ボタンを使用して一度にすべて。どうすればそれについて行くでしょうか?
List<double> scoreArray = new List<double>();
TextBox[] textBoxes = { week1Box, week2Box, week3Box, week4Box, week5Box, week6Box, week7Box, week8Box, week9Box, week10Box, week11Box, week12Box, week13Box };
for (int i = 0; i < textBoxes.Length; i++)
{
scoreArray.Add(Convert.ToDouble(textBoxes[i].Text));
}