Home   Cover Cover Cover Cover
 

Isolated storage

Chap4_Ex8.cs
using System;
using System.IO;
using System.IO.IsolatedStorage;

public class IsolatedStorage {

  public static void Main(string[] args) {
    IsolatedStorageFile iso = IsolatedStorageFile.GetStore(IsolatedStorageScope.User | IsolatedStorageScope.Assembly, null, null);
    IsolatedStorageFileStream ifs = new IsolatedStorageFileStream("test", FileMode.OpenOrCreate, iso);
    
    StreamWriter sw = new StreamWriter(ifs);
    sw.Write("testdata");
    sw.Close();
    ifs.Close();
    iso.Close();
  }
}