Convert string array to List<string>

  • 27554
  • 0
  • C#
  • 2008-10-03

Convert string array to List<string>

今天臨時碰到的小問題...記下來以免忘記。

 


string[] ids = { "PT", "C", "S", "Z", "B", "FSE", "H" };
List<string> newFactory = new List<string>(ids.Length);
newFactory.AddRange(ids);

image

 

DotBlogs 的標籤: