If I define a custom attribute with "Attribute" at the end of its name, I can use that attribute without putting "Attribute" at the end of its name, as follows:
I was rather surprised to see that the above doesn't generate any errors. It's not a problem, but I'm just wondering if it's part of a wider rule that I should know about or whether it just applies for Attributes. Anyone know?
Code:
<AttributeUsage(AttributeTargets.All)> Public Class ContreAttribute
Inherits Attribute
End Class
<Contre()> Public Class ABCAttribute
End Class
I was rather surprised to see that the above doesn't generate any errors. It's not a problem, but I'm just wondering if it's part of a wider rule that I should know about or whether it just applies for Attributes. Anyone know?