【发布时间】:2011-01-03 03:07:38
【问题描述】:
我在这里寻找一个班轮,从:
int [] a = {1, 2, 3};
List<int> l = new List<int>(a);
最后是
String s = "1,2,3";
【问题讨论】:
-
抱歉,我可能不清楚,我想转换
l,而不是a。所以,要改写这个,我会说: Listl = new List (); l.加(1); l.添加(2); l.添加(3);我想结束 "1,2,3" -
或者说
List<int> l = new List<int> {1, 2, 3};