How to read a file from internet?

后端 未结 7 1880
甜味超标
甜味超标 2020-12-03 03:05

simple question: I have an file online (txt). How to read it and check if its there? (C#.net 2.0)

7条回答
  •  渐次进展
    2020-12-03 03:36

    A little bit easier way:

    string fileContent = new WebClient().DownloadString("yourURL");
    

提交回复
热议问题