Compiler Warning (level 1) CS3010

'member': CLS-compliant interfaces must have only CLS-compliant members

In an assembly marked with [assembly:CLSCompliant(true)], an interface contains a member marked with [CLSCompliant(false)]. Remove one of the Common Language Specification (CLS) compliance attributes. For more information about CLS Compliance, see Language independence and language-independent components.

Example

The following example generates CS3010:

// CS3010.cs

using System;

[assembly:CLSCompliant(true)]
public interface I
{
    [CLSCompliant(false)]
    int M();   // CS3010
}

public class C : I
{
    public int M()
    {
        return 1;
    }

    public static void Main()
    {
    }
}