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 CS1532

Property or indexer 'property' cannot override one accessor and hide another. Override both accessors by adding the override keyword to both, remove one of the accessors, or add the new keyword to hide the inherited property.

It is not possible to override one property accessor and hide the other accessor in the same property.

The following sample generates CS1532:

public class C {
   public string s {
      virtual get { 
         return "test";
      }
      virtual set {
      }
   }
}

public class CD : C {
   public string s {
      override get { 
         return "test II";
      }
      set {   // CS1532
      // the following line is one way to resolve this error
      // override set {
      }
   }

   public static void Main () {
   }
}

See Also

Property Declaration | Accessors