Read and write with IsolatedStorageFileStream : IsolatedStorage « File Directory Stream « C# / CSharp Tutorial






using System;
using System.IO;
using System.IO.IsolatedStorage;
class UseIsolatedStorage 
{  
  public static void Main() 
  {
    IsolatedStorageFileStream file = new IsolatedStorageFileStream("MyApp.preferences", FileMode.Create);
    StreamWriter sw = new StreamWriter(file);
    sw.WriteLine("UserType=Analyst");
    sw.WriteLine("UserModer=Advanced");
    sw.Close();
    file.Close();

    file = new IsolatedStorageFileStream("MyApp.preferences", FileMode.Open);
    StreamReader reader = new StreamReader(file);
    String prefs = reader.ReadToEnd();
    Console.WriteLine(prefs);
    file.Close();
    }
}








15.38.IsolatedStorage
15.38.1.Save file to Isolated Storage File
15.38.2.Create Directory in your Isolated Storage File
15.38.3.Get included files in your Isolated Storage File
15.38.4.Write text out To IsoStorage
15.38.5.Read from IsolatedStorage
15.38.6.Read text in From IsoStorage
15.38.7.Open up isolated storage based on identity of user + assembly evidence
15.38.8.Writing To Isolated Storage
15.38.9.Get IsolatedStorageFile for current user
15.38.10.Read and write with IsolatedStorageFileStream