'SyncLock' operand cannot be of type '<typename>' because '<typename>' is not a reference type
The SyncLock
statement allows statements to be synchronized on a single expression by ensuring that multiple threads do not execute the same statements at the same time. The type of expression in a SyncLock
statement must be a reference type, such as a class, a module, an interface, an array, or a delegate.
Error ID: BC30582
- Change the type to an appropriate reference type.
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.
.NET feedback
.NET is an open source project. Select a link to provide feedback: