Skip to content
David Cumps

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 everywhere on the system, but store them in an IsolatedStorage.

Examples

Initialize Store

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

You May Also Like

ArrayList Class

Resizeable, unordered, index-based collection. Suffers from boxing/unboxing when working with value types. Implements IEnumerator, allowing foreach…

BitArray Class

Contains an array of true/false values. Resizable through the Length property. Supports bitwise operations.