asp.net 创建一个对象数组怎么还要new 两次??? 下面的对吗?测试是对的.
LinkButton[,] lb = new LinkButton[7, 7];
for (int i = 0; i <= lb.GetUpperBound(0); i++)
{
for (int j = 0; j <= lb.GetUpperBound(1); j++)
{
lb[i,j] = new LinkButton();
//lb[i,j]=new LinkButton();
lb[i, j].Text = "你好 ";
PlaceHolder1.Controls.Add(lb[i, j]);
}
}
[解决办法]
确实要NEW两次.