"Since the class is an attribute, the name of the class must end with 'Attribute'"
An attribute is a class that is derived from the Attribute class through inheritance. We specify to use the attribute with square brackets and the name of the attribute, omitting the word "Attribute" on the end for short syntax like [SampleAttribute] or [Sample]. So an attribute class name should end with Attribute - 'A' being capital.
[AttributeUsage(AttributeTargets.Class)]
public class Foo : Attribute
{
...
}should be 🡻
[AttributeUsage(AttributeTargets.Class)]
public class FooAttribute : Attribute
{
...
}[AttributeUsage(AttributeTargets.Class)]
public class Fooattribute : Attribute
{
...
}should be 🡻
[AttributeUsage(AttributeTargets.Class)]
public class FooAttribute : Attribute
{
...
}