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()
{
}
}