Redigera

Dela via


IsolatedStorageFile.GetUserStoreForAssembly Method

Definition

Obtains user-scoped isolated storage corresponding to the calling code's assembly identity.

public:
 static System::IO::IsolatedStorage::IsolatedStorageFile ^ GetUserStoreForAssembly();
public static System.IO.IsolatedStorage.IsolatedStorageFile GetUserStoreForAssembly ();
static member GetUserStoreForAssembly : unit -> System.IO.IsolatedStorage.IsolatedStorageFile
Public Shared Function GetUserStoreForAssembly () As IsolatedStorageFile

Returns

An object corresponding to the isolated storage scope based on the calling code's assembly identity.

Exceptions

Sufficient isolated storage permissions have not been granted.

An isolated storage location cannot be initialized.

-or-

The permissions for the calling assembly cannot be determined.

Remarks

The same assembly within different applications always uses the same isolated store when using this method.

GetUserStoreForAssembly is functionally equivalent to the following code:

isoFile = IsolatedStorageFile::GetStore(IsolatedStorageScope::Assembly |
    IsolatedStorageScope::User, (Type^)nullptr, (Type^)nullptr);
isoFile = IsolatedStorageFile.GetStore(IsolatedStorageScope.Assembly |
    IsolatedStorageScope.User, null, null);
isoFile = IsolatedStorageFile.GetStore(IsolatedStorageScope.Assembly Or _
    IsolatedStorageScope.User, Nothing, Nothing)

Note

Different assemblies running within the same application domain always have distinct isolated stores.

Applies to

See also