日期:2014-05-18 浏览次数:21046 次
Label[,] datelabels; datelabels = new Label[7, 5]; for (int i = 0; i < 7; i++) { for (int j = 0; j < 5; j++) { datelabels[i, j] = new Label(); datelabels[i, j].Location = new Point((15 + j * 24), (96 + i * 13)); datelabels[i, j].Text = (i + j).ToString(); this.Controls.Add(datelabels[i, j]); } }