Я должен прочитать текстовый файл в своем мобильном приложении на Windows Phone 7.1. Я пишу код:Прочитать файл в WP7
IsolatedStorageFile fileStorage = IsolatedStorageFile.GetUserStoreForApplication();
StreamReader Reader = null;
try
{
Reader = new StreamReader(new IsolatedStorageFileStream("folder\\file.txt", FileMode.Open, fileStorage));
string textFile = Reader.ReadToEnd();
textBlock.Text = textFile;
Reader.Close();
}
catch
{
MessageBox.Show("File it not created");
}
Все время, когда я пытаюсь прочитать этот файл, приложение покажет мне MessageBox с текстом «файл не создан». У меня нет идеи, почему приложение не находит мой файл.