【发布时间】:2017-07-19 07:56:35
【问题描述】:
我正在尝试读取共享项目中的文件。
var currentPath = Environment.CurrentDirectory;
var filename = Path.Combine(currentPath, "File.txt");
var content = File.ReadAllText(filename);
return content;
如果我在 iOS 中启动我的应用程序,这工作正常,但在 Android 中我得到 FileNotFound 异常。
【问题讨论】:
标签: xamarin readfile filenotfoundexception shared-project