用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( ', '));