Export (0) Print
Expand All
Expand Minimize

Compiler Error CS0529 

Error Message

Inherited interface 'interface1' causes a cycle in the interface hierarchy of 'interface2'

The inheritance list for an interface includes a direct or indirect reference to itself. An interface cannot inherit from itself.

The following sample generates CS0529:

// CS0529.cs
namespace x
{
   public interface a
   {
   }

   public interface b : a, c
   {
   }

   public interface c : b   // CS0529, b inherits from c
   {
   }
}

Community Additions

ADD
Show:
© 2014 Microsoft