`
xitong
  • 浏览: 6177539 次
文章分类
社区版块
存档分类
最新评论

Asp.Net中List泛型数组的参数传递和遍历(示例源码)

 
阅读更多

调用代码:

IList<int> csj1=Sql_List(); // 把处理返回的list数组赋值给csj1


string csj_str="";
foreach (int i in csj1)
{
csj_str+= i.ToString() + ",";

}

g("终于实现了:" + strTest + "共" + csj1.Count + "条");



处理代码:

public static IList<int> Sql_List()
{

List<int> csj = new List<int>();
csj.Add(5);
csj.Add(2);
csj.Add(0);
return csj;

}

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics