How Do I Synchronize Multithreaded Access to a Generic Type?
In general, you should not use a Monitor on generic type parameters. The reason is that the Monitor can only be used with reference types. When you use generic types, the compiler cannot tell in advance whether you will provide a reference or a value type parameter. In C#, the compiler will let you use the lock() statement, yet if you provide a value type as the type parameter, it will have no effect at runtime. In Visual Basic, the compiler will not let you use the SyncLock on generic type parameters if the compiler is not certain the generic type parameter is a reference type.