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 CS0154

The property or indexer 'property' cannot be used in this context because it lacks the get accessor

An attempt to use a property failed because no get accessor method was defined in the property.

The following sample generates CS0154:

public class b {
   public int i {
      set {
      }
      // uncomment the get method to resolve this CS0154
      /*
      get {
         return 0;
      }
      */
   }
}

public class a {
   public static void Main() {
      b bb = new b();
      int j = bb.i;   // CS0154, no get method
   }
}