在学习C#.NET中,有一个问题,就是字符串怎么转成数组,数组怎么转成字符串
字符串转换数组:
string s = "a,b,c,d,e";
string[] result = a.split(',');
数组转换成字符串
string[] arr = {"a", "b", "c", "d", "e" };
string result = string.Join(",", arr);
string std2 = "FUNCtion:RANGe 21";
byte[] send2 = System.Text.Encoding.Default.GetBytes(std2);
这个是字符串转数组。
http://www.cnblogs.com/xiaoqingshe/p/5882601.html字符串与字节数组的相互转换。