对字符串的操作

string yy="yhb,ttt,eee,sss,lll";

            //string a = "a b c ";
            string[] b = yy.Split(new char[] {','});//以逗号分割
            for (int i = 0; i < b.Length; i++)
            {
                MessageBox.Show(b[i]);
            }

你可能感兴趣的:(字符串)