The field holding the monitor synchronization object is not marked readonly
. Usually an instance uses the same synchronization object over its whole lifetime; thus marking it with the proper keyword is recommended.
Mark the field with the synchronization object with the readonly
modifier.