다음을 통해 공유


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

업데이트: 2007년 11월

오류 메시지

'attribute modifier'은(는) 이 선언의 올바른 특성 위치가 아닙니다. 이 선언의 올바른 특성 위치는 'locations'입니다. 이 블록의 모든 특성이 무시됩니다.
'attribute modifier' is not a valid attribute location for this declaration. Valid attribute locations for this declaration are 'locations'. All attributes in this block will be ignored.

컴파일러에서 잘못된 위치에 있는 특성 한정자를 찾았습니다. 자세한 내용은 특성 대상을 참조하십시오.

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

// CS0657.cs
// compile with: /target:library
public class TestAttribute : System.Attribute {}
[return: Test]   // CS0657 return not valid on a class
class Class1 {}