IsolatedStorageScope Enum

Definition

Enumerates the levels of isolated storage scope that are supported by IsolatedStorage.

This enumeration supports a bitwise combination of its member values.

C#
[System.Flags]
public enum IsolatedStorageScope
C#
[System.Flags]
[System.Serializable]
public enum IsolatedStorageScope
C#
[System.Flags]
[System.Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
public enum IsolatedStorageScope
Inheritance
IsolatedStorageScope
Attributes

Fields

Name Value Description
None 0

No isolated storage usage.

User 1

Isolated storage scoped by user identity.

Domain 2

Isolated storage scoped to the application domain identity.

Assembly 4

Isolated storage scoped to the identity of the assembly.

Roaming 8

The isolated store can be placed in a location on the file system that might roam (if roaming user data is enabled on the underlying operating system).

Machine 16

Isolated storage scoped to the machine.

Application 32

Isolated storage scoped to the application.

Examples

The following code example demonstrates how the IsolatedStorageScope enumeration is used in the GetStore methods.

C#

// Retrieve an IsolatedStorageFile for the current Domain and Assembly.
IsolatedStorageFile isoFile =
    IsolatedStorageFile.GetStore(IsolatedStorageScope.User |
    IsolatedStorageScope.Assembly |
    IsolatedStorageScope.Domain,
    null,
    null);

IsolatedStorageFileStream isoStream =
    new IsolatedStorageFileStream("substituteUsername",
    System.IO.FileMode.Open,
    System.IO.FileAccess.Read,
     System.IO.FileShare.Read);

Remarks

Use IsolatedStorageScope to specify a degree of scope for an isolated store. You can specify combinations of these levels that are supported by IsolatedStorage.

Applies to

Product Versions
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1

See also