Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
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.
Example
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.