DisplayNameKeyAttribute 类

定义

用于查找本地化属性名称的键

[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
继承
DisplayNameKeyAttribute
属性

注解

添加了 AttributeTargets.Field 以允许将此属性放置在 Enum 元素上,EnumConverter 将使用该元素本地化每个枚举值

构造函数

名称 说明
DisplayNameKeyAttribute(String)

构造函数

属性

名称 说明
Key

用于查找本地化属性名称的键

方法

名称 说明
GetDefaultKey(FieldInfo)

用于在默认资源文件中查找本地化属性类别的键

GetDefaultKey(PropertyInfo)

用于在默认资源文件中查找本地化属性类别的键

GetDefaultKey(Type)

用于在默认资源文件中查找本地化属性类别的键

适用于