C#中的子字符串

时间:2013-06-22 05:47:15

标签: c#

我想要子串“发送”

 send = name +"  "+telNo1 +"  " +address+"  " +telNo2+"  " +telNo3+"  "
        + email+"  " +bday+" " +address+"   " +occupation;

我将send传递给另一个方法,我需要子字符串send和get值来分隔字符串变量。

1 个答案:

答案 0 :(得分:1)

您的意思是split吗?

string[] splitted_word = send.Split(' ');
foreach (string x in splitted_word)
        {
            Console.WriteLine(x);
        }