数组问题 急!!!在线等。。。
string camId="300,50,65,52";long[] campaignId=new long[]{300,50,65,52};
string camId = "300,50,65,52"; long[] campaignId = camId.Split(new char[] { ',',','}).Select(a=>long.Parse(a)).ToArray(); /* [0] 300 long [1] 50 long [2] 65 long [3] 52 long */
[解决办法]
string camId="300,50,65,52";
long[] campaignId=camId.ToCharArray();
[解决办法]
这是赋给string[]数组的方法
string camId = "300,50,65,52";string[] campaignId = null;campaignId = camId.Split(',');