Export (0) Print
Expand All
Expand Minimize

Compiler Error 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.

The following sample generates C3015:

// CS3015.cs
using System;

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

public class MyClass
   public static void Main()

See Also

What Is the Common Language Specification

© 2015 Microsoft