当前位置: 代码迷 >> ASP.NET >> 用for each 如何循环ArrayList
  详细解决方案

用for each 如何循环ArrayList

热度:960   发布时间:2013-02-25 00:00:00.0
用for each 怎么循环ArrayList
用for   each   怎么循环ArrayList?

------解决方案--------------------------------------------------------
int[] i = new int[] { 1, 2, 3, 4 };
ArrayList al = new ArrayList(i);
string str = string.Empty;
foreach (object c in al)
{
str += c.ToString() + ", ";
}
Response.Write(str.Trim( ', '));
  相关解决方案