34
You can specify that by applying the AttributeUsage attribute to your custom ones, and setting the Inherited property (which is true by default). This property indicates if your attribute can be inherited by classes that are derived from the classes that have your custom attribute applied.
[AttributeUsage( Inherited = false)]
public class CustomAttribute : Attribute
{
}
Recommended read: