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 CS0176

Static member 'member' cannot be accessed with an instance reference; use typename instead

Only a class name can be used to qualify a static variable; an instance name cannot be a qualifier.

The following sample generates CS0176:

public class b {
   public static int ii;
}

public class a {
   public static void Main() {
      b bb = new b();
      int i = bb.ii;   // CS0176
      // try the following line instead
      // int i = b.ii;
   }
}