Storage File. Get User Store For Application Method
Obtains user-scoped isolated storage corresponding to the calling code's application identity.
public: static System::IO::IsolatedStorage::IsolatedStorageFile ^ GetUserStoreForApplication();
public static System.IO.IsolatedStorage.IsolatedStorageFile GetUserStoreForApplication ();
static member GetUserStoreForApplication : unit -> System.IO.IsolatedStorage.IsolatedStorageFile
Public Shared Function GetUserStoreForApplication () As IsolatedStorageFile
An object corresponding to the isolated storage scope based on the calling code's assembly identity.
Sufficient isolated storage permissions have not been granted.
An isolated storage location cannot be initialized.
The application identity of the caller cannot be determined, because the ActivationContext property returned
The permissions for the application domain cannot be determined.
All assemblies associated with an application use the same isolated store when using this method. This method can be used only when the application identity can be determined - for example, when the application is published through ClickOnce deployment or is a Silverlight-based application. If you attempt to use this method outside a ClickOnce or Silverlight-based application, you will receive an IsolatedStorageException exception, because the application identity of the caller cannot be determined.
GetUserStoreForApplication is functionally equivalent to the following code:
isoFile = IsolatedStorageFile::GetStore(IsolatedStorageScope::Application | IsolatedStorageScope::User, (Type^)nullptr);
isoFile = IsolatedStorageFile.GetStore(IsolatedStorageScope.Application | IsolatedStorageScope.User, null);
isoFile = IsolatedStorageFile.GetStore(IsolatedStorageScope.Application Or _ IsolatedStorageScope.User, Nothing)
In this code, the
applicationIdentity parameter for
GetStore(IsolatedStorageScope scope, Object applicationIdentity) is