I tried to create a custom .NET attribute with the code below but accidentally left off the subclass. This generated an easily-fixed compiler error shown in the comment.
AttributeUsageAttribute is just a magic class (like Attribute itself is). This is a built-in compiler rule, and you cannot do something like that for your own attributes.