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 CS0560

Accessor 'accessor1' : cannot override 'accessor2' because it is hidden by 'function'

A property definition is hidden in an indirect base class.

The following sample generates CS0560:

namespace NC
{
   abstract class B
   {
      public int Prop 
      {
         abstract get;
         virtual set 
         { 
            return; 
         }
      }
   }

   abstract class D : B
   {
      public int Set_Prop(int i) 
      {
         return 0;
      }
// to resolve this CS0560, delete the Set_Prop definition and 
// uncomment the definition of Prop
/*
      public override int Prop
      {
         set
         {
            return;
         }
         get
         {
            return 0;
         }
      }
*/
   }

   class DD : D
   {
      // override blocked by non-accessors
      public override int Prop 
      {
         get 
         { 
            return 0; 
         }
         set   // CS0560
         { 
            return; 
         }
      }
      public static void Main()
      {
      }
   }
}

See Also

Property Declaration | Accessors