System.Text.StringBuilder”并不包含“Split”的定义想要以‘c’为分隔,分离字符串,但是提示如题错误,怎么改呢?using System;using System.Collections.Generic;using System.Text;namespace ConsoleApplication5{class Program{st
来源:学生作业学帮网 编辑:学帮网 时间:2024/06/21 00:05:40
System.Text.StringBuilder”并不包含“Split”的定义
想要以‘c’为分隔,分离字符串,但是提示如题错误,怎么改呢?
using System;
using System.Collections.Generic;
using System.Text;
namespace ConsoleApplication5
{
class Program
{
static void Main(string[] args)
{
int i;
Console.WriteLine("请输入一个字符串:");
string str = Console.ReadLine();
StringBuilder newstr = new StringBuilder(str);
newstr.Insert(3,"abcd");
Console.WriteLine(newstr);
char[] tor ={ 'c' };
string[] str1 = new string[100];
str1 = newstr.Split(tor);
int j = 0;
while (j < str1.Length)
{
Console.WriteLine("{0}:{1}",j,str1[j]);
j++;
}
Console.Read();
}
}
}
str1 = newstr.Split(tor); 这行 换成
str1 = newstr.ToString().Split(tor);
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Cons
关于c# using systemusing System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;
c#高手看看什么问题 using System; using System.Collections.Generic; using System.ComponentModel; usiusing System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System
摄氏温度和华氏温度之间的转换.using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;namespace _11_1{public partial
求0-100所有的质数用c#编写using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;namespace WindowsApplication2{ public partial class For
text
帮我注释一下每行代码,就是解释下每行的意思,谢谢了using System;using System.Globalization;using System.Text.RegularExpressions;using System.Windows.Forms; namespace Text{ public partial class Form1 : Form { private s
System.Text.StringBuilder”并不包含“Split”的定义想要以‘c’为分隔,分离字符串,但是提示如题错误,怎么改呢?using System;using System.Collections.Generic;using System.Text;namespace ConsoleApplication5{class Program{st
这里的这个条件是什么意思 我有点模糊(new Text(){{System.out.print(hello);}}!=null)
求大神帮下忙,这个错哪里了呀,怎么修改using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;namespace hanshu2{ class Program { static void MaxValue(int[] intArray,ou
System
SYSTEM.
system
system.
system
system
下列语句错在错在哪里using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace HelloWorld{class Program{static int Main(){Console.Write(HelloWorld);Console.WriteLine(Hello2);Console.Read();return i;}}}