62,041
社区成员
发帖
与我相关
我的任务
分享
string[] aList = new string[10];
int x = 0;
for (; x < 5; aList[x++] = "a" + x) ;
Array.Resize<string>(ref aList, x);
foreach (string a in aList)
{
Response.Write(a + "<br/>");
}
Response.Write("<hr/>");
/*------------------------------------------------------*/
List<string> bList = new List<string>();
x = 0;
for (; x < 5; bList.Add("b" + (++x))) ;
foreach (string b in bList)
{
Response.Write(b + "<br/>");
}