C#

C#,字符串与数组的互相转化

我们经常会将字符串转化为字符串的数组,也经常会将数组转化为字符串,以下方法介绍字符串与数组的互相转化,

定义
string sTest=”aa,bb,cc,dd”;
A.字符串转化为数组,以”,”号分隔
ex:string[] aTest=sTest.Split(‘,’);

B.数组转化为字符串,以”,”号分隔
ex:string nTest=string.Join(“,”,aTest);

Pls call me CPP.
Posts created 150

发表评论

Related Posts

Begin typing your search term above and press enter to search. Press ESC to cancel.

Back To Top