如何获取应用程序路径和读取文本文件Windows Phone 7

Kha*_*han 3 isolatedstorage xap windows-phone-7

我的问题很简单......我希望如此.

  1. 我想获得Windows Phone 7中内置的app路径.
  2. 如何读取放置在项目的BIN文件夹中的TEXT文件.

问候;

Zeeshan Ahmed Khan

the*_*spy 6

你必须使用

Application.GetResourceStream(new Uri(_filePath, UriKind.Relative));
Run Code Online (Sandbox Code Playgroud)

其中_filePath是文件的路径,没有前面的'/',如"bin/file.txt".