net90_PropertyGridHelpers.Attributes_LocalizedEnumTextAttribute - dparvin/PropertyGridHelpers GitHub Wiki

LocalizedEnumTextAttribute class

Specifies a localized text representation for an Enum field, retrieving the display text from a resource file.

[AttributeUsage(AttributeTargets.Enum | AttributeTargets.Property | AttributeTargets.Field)]
public class LocalizedEnumTextAttribute : LocalizedTextAttribute
parameter description
resourceKey The key identifying the localized text in the resource file.

Public Members

name description
LocalizedEnumTextAttribute(…) Specifies a localized text representation for an Enum field, retrieving the display text from a resource file.

Remarks

Initializes a new instance of the LocalizedEnumTextAttribute class.

Examples

public enum Status
{
    [LocalizedEnumText("PendingApproval")]
    Pending,
    
    [LocalizedEnumText("Approved")]
    Approved,
    
    [LocalizedEnumText("Rejected")]
    Rejected
}
[LocalizedEnumText("PropertyName_EnumText")]
public int PropertyName { get; set; }

See Also

⚠️ **GitHub.com Fallback** ⚠️