Attribute inheritance on overridden properties ?  
Author Message
Andrew Mackie





PostPosted: Visual C# Language, Attribute inheritance on overridden properties ? Top

If I override a property, which is decorated with attributes in the base class, does the overridden property inherit attribute declarations from the base class, or does the overriden property start with a clean slate and needs to have all attributes re-declared in the subclass Or is it only modified attributes that need re-declaring, and unchanged ones are inherited



Visual C#7  
 
 
Lee_Dale





PostPosted: Visual C# Language, Attribute inheritance on overridden properties ? Top

The derived class will inherit the attibute from the base clase but you can manually control this by using the Inherited = true/false argument in the base classes attribute.