请问大家如何分割网址形式的字符串呢? 比如:http://forum.csdn.net/PointForum/Forum/PostTopic.aspx如何提取出 forum.csdn.net和PointForum/Forum/PostTopic.aspx这两段呢? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 try... static void Main(string[] args) { string zz = @"http://forum.csdn.net/PointForum/Forum/PostTopic.aspx"; string[] array = zz.Split(new char[] { '/'}); Console.WriteLine(array[2]); Console.WriteLine(array[3]+"/"+array[4]+"/"+array[5]); } Uri _Uri = new Uri("http://forum.csdn.net/PointForum/Forum/PostTopic.aspx "); _Uri.Authority; _Uri.LocalPath;我喜欢使用Uri类. 不包含适合于入口点的静态“Main”方法 如何改变winForm(C#)标题栏的颜色? 前面已结贴,现在又发现新问题了 DataGridViewComboBoxColumn不能排序,而且在其它列排序后内容会清空 Server Error in '/' Application. 请问那有VS2005中文版下载 求匹配汉字英文字母以及.符号的正则表达式 按钮获取gridview中选择行的索引值 求助如何编程找出真正播放音乐(占据声卡的程序) 简单的格式转换 不算难的c#多线程问题!在线,送份儿! 网上的高手请看过来,谢谢 datagridview按照顺序,显示问题
static void Main(string[] args)
{
string zz = @"http://forum.csdn.net/PointForum/Forum/PostTopic.aspx";
string[] array = zz.Split(new char[] { '/'});
Console.WriteLine(array[2]);
Console.WriteLine(array[3]+"/"+array[4]+"/"+array[5]);
}
_Uri.LocalPath;我喜欢使用Uri类.