net90_PropertyGridHelpers.Attributes_LocalizedEnumTextAttribute_LocalizedEnumTextAttribute - dparvin/PropertyGridHelpers GitHub Wiki

LocalizedEnumTextAttribute constructor

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

public LocalizedEnumTextAttribute(string resourceKey)
parameter description
resourceKey The key identifying the localized text in the 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** ⚠️