This documentation is archived and is not being maintained.

Compiler Error CS0061 

Error Message

Inconsistent accessibility: base interface 'interface 1' is less accessible than interface 'interface 2'

A public construct must return a publicly accessible object.

Interface accessibility cannot be narrowed in a derived interface. For more information, see Interfaces (C# Programming Guide) and Access Modifiers (C# Programming Guide).

The following sample generates CS0061.

// CS0061.cs
// compile with: /target:library
internal interface A {}
public interface AA : A {}  // CS0061

// OK
public interface B {}
internal interface BB : B {}

internal interface C {}
internal interface CC : C {}
Show: