Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Compiler Warning (level 1) CS3015
Collapse the table of content
Expand the table of content

Compiler Warning (level 1) CS3015

'method signature' has no accessible constructors which use only CLS-compliant types

To be compliant with the Common Language Specification (CLS), the argument list of an attribute class cannot contain an array. For more information on CLS Compliance, see Writing CLS-Compliant Code and Common Language Specification.

The following sample generates C3015.

// CS3015.cs
// compile with: /target:library
using System;

public class MyAttribute : Attribute
   public MyAttribute(int[] ai) {}   // CS3015
   // try the following line instead
   // public MyAttribute(int ai) {}

Community Additions

© 2015 Microsoft