Compiler Warning (level 1) CS3009
'type': base type 'type' is not CLS-compliant
A base type was marked as not having to be compliant with the Common Language Specification (CLS) in an assembly that was marked as being CLS compliant. Either remove the attribute that specifies the assembly is CLS compliant or remove the attribute that indicates the type is not CLS compliant. For more information on CLS Compliance, see Language independence and language-independent components.
Example
The following example generates CS3009:
// CS3009.cs
using System;
[assembly:CLSCompliant(true)]
[CLSCompliant(false)]
public class B
{
}
public class C : B // CS3009
{
public static void Main () {}
}
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for