using System.IO.IsolatedStorage; IsolatedStorageFile isoStore = IsolatedStorageFile.GetUserStoreForAssembly(); string[] dirNames = isoStore.GetDirectoryNames("MyDirectory/*"); foreach (string dirName in dirNames) { Console.WriteLine(dirName); }
using System.Windows.Forms; using System.IO.IsolatedStorage; IsolatedStorageFile isoStore = IsolatedStorageFile.GetStore(IsolatedStorageScope.User | IsolatedStorageScope.Assembly, null, null); string[] dirNames = isoStore.GetDirectoryNames(); foreach (string dirName in dirNames) { MessageBox.Show(dirName); }This example retrieves the names of all the directories located in the isolated storage with the specified scope and displays them in a message box. The IsolatedStorageFile class is part of the System.IO.IsolatedStorage package library.