【发布时间】:2013-11-26 15:18:41
【问题描述】:
我正在使用
string[] defaultcommands = (File.ReadAllLines(@"commands"));
将解决方案中的本地文件内容作为数组加载。我希望能够从我的工作站更新该文件的内容,并在所有正在运行的实例上生效。为此,我想从如下网址加载默认命令文件:https://mywebsite.com/assistant/commands.txt。我试过 string[] defaultcommands = (File.ReadAllLines(@"https://mywebsite.com/assistant/commands.txt"));但它不明白如何处理我猜的 URL。它返回:System.NotSupportedException。
如何将文本文件从 URL 加载到数组中?
【问题讨论】: