据:http://msdn.microsoft.com/en-us/library/windows/apps/system.io.streamreader.aspx
和http://msdn.microsoft.com/en-us/library/windows/apps/f2ke0fzy.aspx
证明,这是.NET地铁参考:http://msdn.microsoft.com/en-us/library/windows/apps/br230232.aspx
Proof that this is the .NET for Metro Reference: http://msdn.microsoft.com/en-us/library/windows/apps/br230232.aspx
有一个构造函数用于指定文件路径。然而,在对象Broswer和放大器;在元数据不存在
There is a constructor for specifying a file path. Yet in Object Broswer & in the meta data it does not exist.
和显然是所有.NET地铁东西在引用中引用标签。
And apparently all .NET for Metro things are referenced in the References Tab.
我只是试图从项目文件夹,仅此而已访问一个txt文件。如果任何人有一个替代我所有的耳朵。
I am simply trying to access a txt file from the Project Folder, nothing more. If anyone has an alternative I am all ears.
这是在WinRT中的根本性变化之一。你不能只写一个文件,任何你想要的了,你必须使用独立存储。而你需要使用异步I / O与等待的关键字。
"This is one of the fundamental changes in WinRT. You can't just write a file anywhere you want anymore, you have to use isolated storage. And you need to use asynchronous I/O with the await keyword."
这个链接应该为您提供有关如何访问项目文件夹中的文件的必要信息。这里是链接:
This link should provide you with the necessary information on how to access files in your project folder. Here is the link:
的http:// blog.jerrynixon.com/2012/06/windows-8-how-to-read-files-in-winrt.html