Compiler Warning (level 1) CS3027

'type_1' is not CLS-compliant because base interface 'type_2' is not CLS-compliant

A non-CLS compliant type cannot be a base type for a type that is CLS compliant.

The following sample contains an interface with a method that uses a non-CLS compliant type in its signature, making the type non-CLS compliant.

// CS3027.cs
// compile with: /target:library
public interface IBase
   void IMethod(uint i);

The following sample generates CS3027.

// CS3027_b.cs
// compile with: /reference:CS3027.dll /target:library /W:1
public interface IDerived : IBase {}

Community Additions