【发布时间】:2013-04-03 05:22:15
【问题描述】:
我已经尝试过了,但它给了我一个错误:
“不支持给定路径的格式”。
private void btnVerify_Click(object sender, EventArgs e)
{
int counter = 0;
string email = textVarify.Text;
string line="";
System.IO.StreamReader file = new System.IO.StreamReader("https://dl.dropboxusercontent.com/u/9013501/bots/lic.txt");
while ((line = file.ReadLine()) != null)
{
if (line.Contains(textVarify.Text))
{
DevComponents.DotNetBar.MessageBoxEx.Show("Email",textVarify.Text+" Found");
}
counter++;
}
file.Close();
}
这有什么问题?
【问题讨论】:
-
AFAIK
StreamReader需要一个本地文件。您可以使用WebClient下载文件,然后进行流式传输。示例:csharpdeveloping.net/Snippet/how_to_download_text_file -
感谢 AFAIK 你说得对,我的问题已经解决了
-
乐于助人。我添加了我的答案。