您的位置:首页 > 编程语言 > C#

C# 数组类型转换 int[] 转换string[]

2011-06-17 10:20 561 查看
private static string iii(long i) { return i.ToString(); }
public static void Main(string[] args)
{
List<long> listtemp = new List<long>();
listtemp.Add(1000);
listtemp.Add(1000);
listtemp.Add(1000);
listtemp.Add(1000);
string[] ttt = Array.ConvertAll(listtemp.ToArray(), new Converter<long, string>(iii));
string[] bbb = Array.ConvertAll<long, string>(listtemp.ToArray(), delegate(long x) { return x.ToString(); });
Console.WriteLine(string.Join(",", bbb));
Console.Read();
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: