How to read a file from internet?

后端 未结 7 1912
甜味超标
甜味超标 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:28

    Look at System.Net.WebClient, the docs even have an example of retrieving the file.

    But testing if the file exists implies asking for the file and catching the exception if it's not there.

提交回复
热议问题