NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Compiler Error CS0185

'type' is not a reference type as required by the lock statement

The lock statement can only evaluate reference types.

The following sample generates CS0185:

public class MainClass {
   public static void Main () {
      lock (1) {   // CS0185 
      // try the following lines instead
      // MainClass x = new MainClass();
      // lock(x) {
      }
   }
}