Search code examples
windows-phone-7xapisolatedstorage

How To Get App Path and Read Text File Windows Phone 7


My Question is very simple...I hope.

  1. I want to get the path of app built in Windows Phone 7.
  2. How to Read TEXT File that is placed in BIN folder of the project.

Regards;

Zeeshan Ahmed Khan


Solution

  • You have to use

    Application.GetResourceStream(new Uri(_filePath, UriKind.Relative));
    

    where _filePath is the Path to your File without a preceding '/', like "bin/file.txt".