dotnet / dotnet/dotnet-api-docs

Code snippet for Mutex.OpenExisting in .NET Core calls non-existing methods

Open
#7,913 1 comment 1 reaction 0 assignees View on GitHub
area-System.Security help wanted Pri3
Dominant language
C#
Stars
949
Forks
1.7k
Avg merge
3d 27m
Merged PRs (30d)
49

Description

The example makes a call to a four-parameter Mutex constructor `public Mutex (bool initiallyOwned, string name, out bool createdNew, System.Security.AccessControl.MutexSecurity mutexSecurity)` that doesn't exist in .NET Core. A call to `public static System.Threading.Mutex Create (bool initiallyOwned, string? name, out bool createdNew, System.Security.AccessControl.MutexSecurity? mutexSecurity)` should be used instead.

It also calls a two-parameter `public static System.Threading.Mutex OpenExisting (string name, System.Security.AccessControl.MutexRights rights)` method that should be changed to a call to `public static System.Threading.Mutex OpenExisting (string name, System.Security.AccessControl.MutexRights rights)`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.