这段觉得写得有点啰嗦,请帮忙修改修改
for (int i = 0; i < 5; i++){
tmp = ra.Next(minValue, maxValue); //随机取数
arrNum[i] = getNum(arrNum, tmp, minValue, maxValue, ra); //取出值赋到数组中
}
MemoryStream ms0 = new MemoryStream(FromDataBase(arrNum[0]));
MemoryStream ms1 = new MemoryStream(FromDataBase(arrNum[1]));
MemoryStream ms2 = new MemoryStream(FromDataBase(arrNum[2]));
MemoryStream ms3 = new MemoryStream(FromDataBase(arrNum[3]));
MemoryStream ms4 = new MemoryStream(FromDataBase(arrNum[4]));
pictureBox1.Image = Image.FromStream(ms0, true);
label1.Text = GetNameFromDateBase(arrNum[0]);
pictureBox2.Image = Image.FromStream(ms1, true);
label2.Text = GetNameFromDateBase(arrNum[1]);
pictureBox3.Image = Image.FromStream(ms2, true);
label3.Text = GetNameFromDateBase(arrNum[2]);
pictureBox4.Image = Image.FromStream(ms3, true);
label4.Text = GetNameFromDateBase(arrNum[3]);
pictureBox5.Image = Image.FromStream(ms4, true);
label5.Text = GetNameFromDateBase(arrNum[4]);