Ask Learn
Preview
Ask Learn is an AI assistant that can answer questions, clarify concepts, and define terms using trusted Microsoft documentation.
Please sign in to use Ask Learn.
Sign inThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Identifies the scope of a sharable resource.
This enumeration supports 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
[System.Flags]
public enum ResourceScope
[<System.Flags>]
type ResourceScope =
Public Enum ResourceScope
Name | Value | Description |
---|---|---|
None | 0 | There is no shared state. |
Machine | 1 | The state is shared by objects within the machine. |
Process | 2 | The state is shared within a process. |
AppDomain | 4 | The state is shared by objects within an AppDomain. |
Library | 8 | The state is shared by objects within a library. |
Private | 16 | The resource is visible to only the type. |
Assembly | 32 | The resource is visible at an assembly scope. |
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
.
Product | Versions |
---|---|
.NET | Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10 |
.NET Framework | 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 |
.NET feedback
.NET is an open source project. Select a link to provide feedback:
Ask Learn is an AI assistant that can answer questions, clarify concepts, and define terms using trusted Microsoft documentation.
Please sign in to use Ask Learn.
Sign in