Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Compiler Error CS0538
Collapse the table of content
Expand the table of content

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
   {
   }
}

Community Additions

ADD
Show:
© 2015 Microsoft