Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Expand Minimize
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

Compiler Error CS0551 

Error Message

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 Using Properties (C# Programming Guide).

Example

The following sample generates CS0551.

// CS0551.cs
// compile with: /target:library
interface ii
{
   int i
   {
      get;
      set;
   }
}

public class a : ii
{
   int ii.i { set {} }   // CS0551

   // OK
   int ii.i    
   {
      set {}
      get { return 0; }
   }
}

Community Additions

ADD
Show:
© 2015 Microsoft