Well, there's an AttributeUsageAttribute... on Attributes classes.
For example, RangeAttribute looks like that
[AttributeUsage(AttributeTargets.Property|AttributeTargets.Field|AttributeTargets.Parameter, AllowMultiple = false)]
public class RangeAttribute : ValidationAttribute
One of the properties of AttributeUsageAttribute class is Inherited
, which looks like that.
//
// Summary:
// Gets or sets a Boolean value indicating whether the indicated attribute can
// be inherited by derived classes and overriding members.
//
// Returns:
// true if the attribute can be inherited by derived classes and overriding
// members; otherwise, false. The default is true.
public bool Inherited { get; set; }
So as we've seen in Definition of RangeAttribute
, Inherited
property is not present in attribute.
So by default it's true, so attribute is inherited on overriding members.