Compiler Warning (level 1) CS0658
'attribute modifier' is not a recognized attribute location. All attributes in this block will be ignored.
An invalid attribute modifier was specified. See Attribute Targets for more information.
The following sample generates CS0658:
C#
// CS0658.cs
using System;
public class TestAttribute : Attribute {}
[badAttributeLocation: Test] // CS0658, badAttributeLocation is invalid
class ClassTest
{
public static void Main()
{
}
}
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.
.NET feedback
.NET is an open source project. Select a link to provide feedback: