Using own enum in settings

Viewed 4939

I would like to use my own enum in a project setting (from Visual studio, menu project, properties, tab settings).

I can select a lot of default types there, but even types from other projects in my solution, but not the project itsself.

Is it possible to use an enumeration type from the project itsself as type for a setting?

3 Answers

Easily.

Although the picklist shows you Types from all kinds of assemblies except your own, if you type the exact NamespaceQualified.NameOfYourEnum into the textbox at the bottom, it will work, and the GUI will show you a dropdown of Enum values.

Tested in VS2013.

If you make a mistake it is caught during build, and you can edit the settings.settings file to fix.

Related