7
I have a enum
and would like to change the Description
with Resource:
public enum SystemArea
{
[Description("Gestor")]
Gestor = 3,
[Description("Administrador")]
Administrador = 2,
[Description("Professor | Profesor")]
Professor = 1,
[Description("Aluno | Alumno")]
Aluno = 0,
}
I’ve tried it in the following ways, but none of it worked: 1) Passing the Resource to Description itself
[Description(Resources.DISPLAY_GESTOR)]
Gestor = 3
2) With the Display:
[Display(Name = "DISPLAY_GESTOR", ResourceType = typeof(Resources))]
Gestor = 3
Is there any way to solve?
Look at this, it helps you more than the answer I posted? http://stackoverflow.com/questions/569298/localizing-enum-descriptions-attributes if applicable, I will update the response. You also have: http://stackoverflow.com/q/17380900/221800
– Maniero