[英]Error: URI formats are not supported. c#
我的代碼在這里:
StreamReader sr;
sr = File.OpenText(@"http://k1.besaba.com/Lic.rtf");
richTextBox1.Rtf = sr.ReadToEnd();
sr.Close();
為什么出錯附加信息:不支持URI格式。 請幫我。 謝謝。 圖片在這里: http : //i.stack.imgur.com/51at6.png
File.OpenText()
用於打開本地存儲在文件系統上的文件。 您可能想要執行以下操作:
var webClient = new WebClient(); //Make sure to reference System.Net
richTextBox1.Rtf = client.DownloadString("http://k1.besaba.com/Lic.rtf");
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.