Partager via


DisplayNameKeyAttribute Class

Definition

The key used to look up the localized property name

[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Field | System.AttributeTargets.Interface | System.AttributeTargets.Property)]
public class DisplayNameKeyAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Field | System.AttributeTargets.Interface | System.AttributeTargets.Property)>]
type DisplayNameKeyAttribute = class
    inherit Attribute
Public Class DisplayNameKeyAttribute
Inherits Attribute
Inheritance
DisplayNameKeyAttribute
Attributes

Remarks

The AttributeTargets.Field is added to allow this attribute to be placed on Enum elements which the EnumConverter will use to localize each Enum value

Constructors

DisplayNameKeyAttribute(String)

Constructor

Properties

Key

The key used to look up the localized property name

Methods

GetDefaultKey(FieldInfo)

The key used to look up a localized property category in a default resource file

GetDefaultKey(PropertyInfo)

The key used to look up a localized property category in a default resource file

GetDefaultKey(Type)

The key used to look up a localized property category in a default resource file

Applies to