title: Transform array into text file and store in isolated storage
body: <p>I am trying to transform all the data inside my array into textfile, so as to read all the item one by one and save it into an isolated storage and displaying it out in another page listbox.</p>
  
  <p>I tried this but i encounter error stating "Operation not permitted on IsolatedStorageFileStream". I need help in this, and please get back to me asap. Thank you! </p>
  
  <pre><code>    //save list to favourite list
      private void addListBtn_Click(object sender, RoutedEventArgs e)
      {
  
          ///////for-loop to access userDrinksList
          //////transform array into textfile, one line for each drink
          ///////write in quantity of file into isolated storage using write line function
  
          for (int i = 0; i &lt; (Application.Current as App).userDrinksList.Count; i++)
          {
  
              //Obtain the virtual store for application
              IsolatedStorageFile storage = IsolatedStorageFile.GetUserStoreForApplication();
  
              //Create a new folder and call it "ListFolder"
              storage.CreateDirectory("ListFolder");
  
  
              //Create a new file and assign a StreamWriter to the store and this new file (myFile.txt)
              //Also take the text contents from the txtWrite control and write it to myFile.txt
             // StreamReader readFile = null;
              StreamWriter writeFile = new StreamWriter(new IsolatedStorageFileStream("ListFolder\\myFile.txt", FileMode.OpenOrCreate, storage));
              StreamReader readFile = new StreamReader(new IsolatedStorageFileStream("ListFolder\\myFile.txt", FileMode.Open, storage));
  
              string myFile = readFile.ReadToEnd();
              string[] lines = myFile.Split(System.Environment.NewLine.ToCharArray(), StringSplitOptions.RemoveEmptyEntries);
  
              //write content inside myFile.txt
              writeFile.WriteLine(myFile); 
  
              //retrieveDrinksListBox.Items.AddRange(lines); 
              //writeFile.Close();
          }
  </code></pre>