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 Using Properties.
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() {}
}
}
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.
.NET feedback
.NET is an open source project. Select a link to provide feedback: