This documentation is archived and is not being maintained.

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)]
public class C
    public void F([CLSCompliant(true)] int i)

    public static void Main()