.NET ez 2011-11-30
不須透過迴圈,直接將Array專為List
using System;
using System.Collections.Generic;
namespace Test
{
class Program
{
static void Main(string[] args)
{
string[] s = { "a", "b", "c", "d", "e" };
List<string> l = new List<string>(s);
Console.WriteLine(String.Join(",", l.ToArray()));
}
}
}標籤: .NET
