System.ComponentModel.DisplayNameAttribute Class

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

See Also: DisplayNameAttribute Members

Syntax

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

Remarks

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.

Requirements

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