C#实现字符串转数组、数组转字符串和遍历数组
string pictureid = "1,2,3";
string[] arr= pictureid.Split(','); //字符串转数组
foreach (string aa in arr) //遍历数组
{
context.Response.ContentType = "text/plain";
context.Response.Write(aa);
}
pictureid = string.Empty;
pictureid = string.Join(",", arr); //数组转成字符串