求助 将字符串分解后,赋值给数组
string stra = "a,b,c,d,e,f"
string[] arrstr = new string[stra.Length - stra.Replace(",","").Length ]
分隔符号为","
接下来,我要怎么才能将分解后的字符赋值给数组呀??
------解决方案--------------------string stra = "a,b,c,d,e,f"
string[] arr = star.Split(',');
------解决方案--------------------string stra = "a,b,c,d,e,f";
string[] arrstr =stra.Split(',');