Export (0) Print
Expand All
Expand Minimize

Compiler Error CS0538 

Error Message

'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:
© 2014 Microsoft