C#: How to add an attributes to an object at run-time?

后端 未结 7 1953
孤独总比滥情好
孤独总比滥情好 2020-12-30 09:00

As an entity class, I want to add an attributes at run-time, how should I do?

7条回答
  •  孤独总比滥情好
    2020-12-30 09:06

    Use a hashtable to store your attributes.

    If you want more runtime flexibility, you might try Ruby or some other interpreted language.

提交回复
热议问题