[英]How to read a text file which is added to project before complilation?
I have such problem. 我有这样的问题。
I have text file. 我有文本文件。 I'd like to add it into my project and then read it.
我想将其添加到我的项目中,然后阅读。 This file is Lua script.
该文件是Lua脚本。 I read, that I can read it and save in IsolatedStorage.
我读到可以阅读并保存在IsolatedStorage中。 But I have several problems:
但是我有几个问题:
I'm writing in C#, XNA 4.0, Windows Phone 8 SDK. 我正在用C#,XNA 4.0,Windows Phone 8 SDK编写。 In SDK there is no classes like 'Application' (System.Windows - there is no such namespace)
在SDK中,没有像“应用程序”这样的类(System.Windows-没有此类名称空间)
There is no 'ResourceReader' class (There is no ResourceReader class in System.Resource namespace) 没有“ ResourceReader”类(System.Resource命名空间中没有ResourceReader类)
I'm reading stackoverflow tips, but they are all not working in my case. 我正在阅读stackoverflow提示,但在我的情况下它们都无法正常工作。
How to read embedded resource text file 如何读取嵌入式资源文本文件
And had references to the assemblies you need in case you can't find that added to the project already. 并且已经引用了所需的程序集,以防您找不到已添加到项目中的程序集。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.