Compiler Error CS0550
TOC
Collapse the table of content
Expand the table of content
The document is archived and information here might be outdated

Compiler Error CS0550

'accessor' adds an accessor not found in interface member 'property'

The implementation of a property in a derived class contains an accessor that was not specified in the base interface.

For more information, see Property Declaration and Accessors.

The following sample generates CS0550:

// CS0550.cs
namespace x
{
   interface ii
   {
      int i
      {
         get;
         // add the following accessor to resolve this CS0550
         // set;
      }
   }

   public class a : ii
   {
      int ii.i
      {
         get
         {
            return 0;
         }
         set // CS0550, no set in interface
         {
         }
      }

      public static void Main()
      {
      }
   }
}
Show:
© 2016 Microsoft