CommonDisplayNameKeyAttribute 类
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
用于查找本地化属性名称的键
[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Field | System.AttributeTargets.Interface | System.AttributeTargets.Property)]
public class CommonDisplayNameKeyAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Field | System.AttributeTargets.Interface | System.AttributeTargets.Property)>]
type CommonDisplayNameKeyAttribute = class
inherit Attribute
Public Class CommonDisplayNameKeyAttribute
Inherits Attribute
- 继承
-
CommonDisplayNameKeyAttribute
- 属性
注解
添加了 AttributeTargets.Field 以允许将此属性放置在 Enum 元素上,EnumConverter 将使用该元素本地化每个枚举值
构造函数
| 名称 | 说明 |
|---|---|
| CommonDisplayNameKeyAttribute(String) |
构造函数 |
属性
| 名称 | 说明 |
|---|---|
| Key |
用于查找本地化属性名称的键 |
方法
| 名称 | 说明 |
|---|---|
| GetDefaultKey(FieldInfo) |
用于在默认资源文件中查找本地化属性类别的键 |
| GetDefaultKey(PropertyInfo) |
用于在默认资源文件中查找本地化属性类别的键 |
| GetDefaultKey(Type) |
用于在默认资源文件中查找本地化属性类别的键 |