![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
mvc
坤灵小舍
努力把握自己的人生!加油
展开
-
c# 下载远程服务器文件
方法1:WebClient 读取文件流下载 WebClient client = new WebClient(); byte[] bytes = client.DownloadData(Url); HttpContext.Response.ContentType = "application/octet-stream"...原创 2018-09-26 16:29:24 · 2097 阅读 · 0 评论 -
c# 获取url中域名等信息
用这个串生成一个uri对象,然后从uri对象可以得到所有分解的部分。 Uri u = new Uri("http://www.baidu.com/sasasasas/fdfddfx.php"); string sHost = u.Host; string sPort = u.Port; 还有以下的属性可用: 名称 说明 AbsolutePath 获取 URI 的绝对路径。 ...转载 2018-09-26 16:47:12 · 3318 阅读 · 0 评论