ResourceScope ResourceScope ResourceScope ResourceScope Enum


Identifies the scope of a sharable resource.

This enumeration has a FlagsAttribute attribute that allows a bitwise combination of its member values.

This API supports the product infrastructure and is not intended to be used directly from your code.

public enum class ResourceScope
public enum ResourceScope
type ResourceScope = 
Public Enum ResourceScope


AppDomain AppDomain AppDomain AppDomain 4

The state is shared by objects within an AppDomain.

Assembly Assembly Assembly Assembly 32

The resource is visible at an assembly scope.

Library Library Library Library 8

The state is shared by objects within a library.

Machine Machine Machine Machine 1

The state is shared by objects within the machine.

None None None None 0

There is no shared state.

Private Private Private Private 16

The resource is visible to only the type.

Process Process Process Process 2

The state is shared within a process.


A resource is an object that holds state. Examples of resources include a file on disk, a message queue for a process, and a named Mutex. Knowing an object is a resource does not indicate its appropriate use; the important property of a resource is the scope of the resource. The scope includes both the type and the visibility of the resource. The resource type specifies whether the resource is a machine-level resource, such as a file on disk, a process-wide resource, such as a block of non-shared memory, or an application domain-level resource, such as a lock on an instance of a non-marshal by reference object. The visibility scopes are Assembly and Private, the default is Public, which is implicit if Private or Assembly are not indicated. There is no enumeration value for Public.

Applies to