Edit

Share via


'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

To correct this error

  • Change the type to an appropriate reference type.

See also