Skip to content
David Cumps
Exam 70-536 study notes

IsolatedStorageFile Class

Part of my 2008 study notes for exam 70-536 (.NET Framework 2.0).

Overview

  • Represents a sandbox location to store application-specific data in.
  • Assembly/Machine store for application-level data.
  • Assembly/User store for user-level data.
  • Use IsolatedStorageFileStream to work with files in a store.

Good practice

  • Don’t write your state to local .xml files all over the system; store it in isolated storage instead.

Examples

Initialize Store

IsolatedStorageFile a = IsolatedStorageFile.GetMachineStoreForAssembly();
 
foreach (string f in a.GetFileNames("*"))
{
    Console.WriteLine(f);
}

You May Also Like