Name

InheritanceAttribute

Synopsis

The System.ComponentModel.Design.IInheritanceService uses this attribute to follow the hierarchy of components in the designer.

You can use this attribute to specify the InheritanceLevel of the property that it adorns. Note that this inheritance does not mean class-level inheritance, but rather that one Component exposes another Component through a public property.


public sealed class InheritanceAttribute : Attribute {

// Public Constructors

   public InheritanceAttribute();

   public InheritanceAttribute(InheritanceLevel inheritanceLevel);

// Public Static Fields

   public static readonly InheritanceAttribute Default;  // =NotInherited

   public static readonly InheritanceAttribute Inherited;  // =Inherited

                  // =InheritedReadOnly

 public static readonly InheritanceAttribute InheritedReadOnly;

   public static readonly InheritanceAttribute NotInherited;  // =NotInherited

                  // Public Instance Properties

   public InheritanceLevel InheritanceLevel{get; }

// Public Instance Methods

   public override bool Equals(object value);  // overrides Attribute

   public override int GetHashCode();  // overrides Attribute

   public override bool IsDefaultAttribute();  // overrides Attribute

   public override string ToString();  // overrides object

}

Hierarchy

System.Object System.Attribute InheritanceAttribute

Valid On

Property, Field, Event

Get .NET Windows Forms in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.