Compiler Warning (level 1) CS3022
CLSCompliant attribute has no meaning when applied to parameters. Try putting it on the method instead.
Method parameters are not checked for CLS Compliance, since the CLS Compliance rules apply to methods and type declarations.
The following sample generates CS3022:
// CS3022.cs
// compile with: /W:1
using System;
[assembly: CLSCompliant(true)]
[CLSCompliant(true)]
public class C
{
public void F([CLSCompliant(true)] int i)
{
}
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.
.NET feedback
.NET is an open source project. Select a link to provide feedback: