using System; namespace DemoConsole { class Program { static void Main(string[] args) { // 初始化字符串 string str = "a;b;c;d;e;f;g;"; // 使用Split方法分割字符串饼存入数组 string[] p = str.Split(';'); for (int i = 0; i < p.Length; ++i) { Console.WriteLine (p[i]); } Console.Read(); } } }使用Split函数的时候,只能对字符进行分割,所以用单引号Split('');