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 CS1014

A get or set method expected

A method declaration was found in a property declaration. Only get and set methods are allowed to be declared in a property.

The following sample generates CS1014:

namespace x {
   public class clx {
      int j {
         get {
            return 0;
         }
         
      int z() {   // CS1014, unexpected, not get or set
         return 0;
      }
   }
   public class cly : clx {
      public static void Main() {
      }
   }
}

See Also

Property Declaration | Accessors