List<>与string[]以及List<>与string

List<> convert to string[]

List<string> list=new List<string>();

string str=list.ToArray();

String[] convert to List<>

string[] str={"str1","str2","str3"};

List<string> list=new List<string>(str);

List<> convert to String

List<string> list=new List<string>();

string str=String.Join(";",list.ToArray());

你可能感兴趣的:(String)