Compiler Error CS0538
'name' in explicit interface declaration is not an interface
An attempt was made to explicitly declare an interface, but an interface was not specified.
The following sample generates CS0538:
// CS0538.cs
interface MyIFace
{
void F();
}
public class MyClass
{
public void G()
{
}
}
class C: MyIFace
{
void MyIFace.F()
{
}
void MyClass.G() // CS0538, MyClass not an interface
{
}
}
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: