Click here to Skip to main content
15,887,746 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am relative beginner in C#.
I have a list of objects and each object has a list of properties.
I also have a master template with all the possible or recognized properties that can be assigned.
I want the user to select properties from a drop down list and also want the master template list to be extensible without modifying code and recompiling.
Is there a way to assign string data from the template list to an enumeration?
Or do I just have to hard code it in my class definition?

Any pointers as to where to look in the .NET documentation would be most welcome.

Thanks

What I have tried:

Don't know where to begin on this one. I am sure it requires data/object reflection, but a bit lost on how to apply this to an enumeration.
Posted
Comments
[no name] 17-Sep-20 19:54pm    
Maybe show some code. You may be mixing up some terminology. Input fields that are limited to a particular "list" are usually supplied via a "ComboBox". The source of the list can be anything (that doesn't require compiling).
Batta59 19-Sep-20 12:54pm    
@Gary,
Thank you. A combo box provides the functionality I want to implement.
Appreciate the help.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900