System.ComponentModel.DisplayNameAttribute Class

Specifies the display name for a property, event, or public void method which takes no arguments.

See Also: DisplayNameAttribute Members


[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method | System.AttributeTargets.Property | System.AttributeTargets.Event | System.AttributeTargets.All)]
public class DisplayNameAttribute : Attribute


The default is the name of the property or event. The default implementation of System.ComponentModel.Design.DesignerActionList.GetSortedActionItems uses reflection to search the public properties and public void methods that take no arguments. System.ComponentModel.Design.DesignerActionList.GetSortedActionItems searches for the System.ComponentModel.DisplayNameAttribute on each property and method and, if found, uses that string instead of the property or method name.


Namespace: System.ComponentModel
Assembly: System (in System.dll)
Assembly Versions:,
Since: .NET 2.0