我正在尝试将多行文本框的每一行的值传输到字符串数组或多维数组中。我还有 3 个多行文本框需要放入同一个数组中。以下是我一直在尝试的方法之一:
ParkingTimes[0] = tbxtimeLimitS1.Text;
for (int i = 1; i <= 10; i++)
ParkingTimes[i] = tbxparkingTimesS1.Lines;
ParkingTimes[11] = tbxtimeLimitS2.Lines;
for (int x = 0; x <= 10; x++)
for (int i = 12; i <= 21; i++)
ParkingTimes[i] = tbxparkingTimesS2.Lines;
ParkingTimes[11] = tbxtimeLimitS2.Lines[0];
for (int x = 0; x <= 10; x++)
for (int i = 23; i <= 32; i++)
ParkingTimes[i] = tbxparkingTimesS3.Lines;
我究竟做错了什么?有没有更好的方法来实现这一点?