// Use the return value from this method within a 'Using' statement to release resources when done.
        private static IsolatedStorageFile GetStoreFile(IsolatedStorageType storeType)
        {
            switch (storeType)
            {
                case IsolatedStorageType.Application: return IsolatedStorageFile.GetUserStoreForApplication();
                case IsolatedStorageType.Site: return IsolatedStorageFile.GetUserStoreForSite();

                default: throw new NotSupportedException(storeType.ToString());
            }
        }
 private static IsolatedStorageSettings GetStore(IsolatedStorageType storeType)
 {
     switch (storeType)
     {
         case IsolatedStorageType.Application: return IsolatedStorageSettings.ApplicationSettings;
         case IsolatedStorageType.Site: return IsolatedStorageSettings.SiteSettings;
         
         default: throw new NotSupportedException(storeType.ToString());
     }
 }