Open up isolated storage based on identity of user + assembly evidence : IsolatedStorage « File Directory Stream « C# / CSharp Tutorial






using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

using System.IO;
using System.IO.IsolatedStorage;
using System.Security.Permissions;

[assembly: IsolatedStorageFilePermission(SecurityAction.RequestMinimum, UsageAllowed = IsolatedStorageContainment.AssemblyIsolationByUser)]
public class MainClass{
    public static void Main()
    {
      using (IsolatedStorageFile store = IsolatedStorageFile.GetUserStoreForAssembly())
      {
        using (IsolatedStorageFileStream isStream = new IsolatedStorageFileStream("MyData.txt",FileMode.OpenOrCreate, store))
        {
          using (StreamWriter sw = new StreamWriter(isStream))
          {
            sw.WriteLine("This is my data.");
            sw.WriteLine("Cool, huh?");
          }
        }
      }
    }
}








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