語言

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 元素上,Enum Converter 會用這些元素來本地化每個 Enum 值

建構函式

名稱 Description
DisplayNameKeyAttribute(String)

建構函式

屬性

名稱 Description
Key

該金鑰用於查詢當地化的物業名稱

方法

名稱 Description
GetDefaultKey(FieldInfo)

用於查詢預設資源檔案中本地化屬性類別的鍵

GetDefaultKey(PropertyInfo)

用於查詢預設資源檔案中本地化屬性類別的鍵

GetDefaultKey(Type)

用於查詢預設資源檔案中本地化屬性類別的鍵

適用於