2

I've got a enum decorated with a description to get a readable description:

public enum MyEnum
{
  [Description("First Class")]
  FirstClass = 0,
  [Description("Second Class")]
  SecondClass = 1,
}

For some customers it would be helpful to show a different description - Is there a way to change the description value during runtime? Like

MyEnum.SecondClass.Description = "New Class";
2
  • possible duplicate of Change values in Class Attribute at runtime - Hope it will help Commented Feb 14, 2014 at 11:21
  • I cant see how you can change it runtime. Not unless you save the new value in a storage of some kind like a database... Commented Feb 14, 2014 at 11:21

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.