Share via


컴파일러 경고(수준 1) CS3015

업데이트: 2007년 11월

오류 메시지

'method signature'에는 CLS 규격 형식만 사용하는 액세스 가능 생성자가 없습니다.
'method signature' has no accessible constructors which use only CLS-compliant types

CLS(공용 언어 사양) 규격을 사용하려면 특성 클래스의 인수 목록에 배열이 없어야 합니다. CLS 규격에 대한 자세한 내용은 CLS 규격 코드 작성공용 언어 사양을 참조하십시오.

예제

다음 샘플에서는 C3015 경고가 발생하는 경우를 보여 줍니다.

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

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