string str = "中.华.人.民.共.和.国";
string[] arrStr = str.split(".");
foreach(string s in arrStr)
{
Console.WritLine(string)
}非常容易
string[] arrStr = str.split(".");
foreach(string s in arrStr)
{
Console.WritLine(string)
}非常容易
解决方案 »
- 有没有谁想过把美工做完的静态页面生成ASP.NET的动态页面
- asp.net中Session的问题
- 抓取网页源码中的信息
- word-break:break-all 未知的属性名?
- 求助:web(iis7)与 应用程序共享内存方法?
- 购物车问题
- asp.net的安装程序的问题
- 关于.NET 中提交按钮属性CausesValidation= "true " 与 OnClientClick= "return true; " 冲突的问题,急,在线等!!
- 问个简单的问题,点击GridView中的某一行,如何的到行号
- 如何在客户端调用Excel进行打印?
- 在线等待?请教有关StoreProcedure问题? 解决者给予500分
- Response.Redirect能不能使页面跳转的时候是弹出新窗口,在线等
我的理解是将数组元素都存在一个字串中,然后通过“.”将它们分割
string s = "a.b.c.d";
string[] as = s.Split('.');
as就是你要的数组
如
string str = "ja#f*l&k^a(sd";
string [] callstr = str.Split('#','*','&''^','(');
实现把str按#,*,&,^,(进行分割
callstr[0]==》ja
callstr[1]==》f
callstr[2]==》l
callstr[3]==》k
callstr[4]==》a
callstr[5]==》sd
string [] callstr = str.Split({'#','*','&''^','('});
split("1234567", "234") == {"1","567"}的
你可以试试啊