This documentation is archived and is not being maintained.

Compiler Error CS0551

Explicit interface implementation 'implementation' is missing accessor 'accessor'

A class that explicitly implements an interface's property must implement all the accessors that the interface defines.

For more information, see Property Declaration and Accessors.

The following sample generates CS0551:

// CS0551.cs
interface ii
{
   int i
   {
      get;
      set;
   }
}

public class a : ii
{
   int ii.i   // CS0551
   {
      set
      {
      }
      // uncomment the following accessor to resolve
      /*
      get
      {
         return 0;
      }
      */
   }

   public static void Main()
   {
   }
}
Show: