This topic has not yet been rated - Rate this topic

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
   {
   }
}
Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ