Maybe a bit silly question, but in one of my projects I needed an enum and I suddenly wondered what would
be the best place for it to write it in a file. Should it be in a .cs file of his own or could I place it in the
class file where it is mostly used?
Thanks in advance for any enlightment.
ddanbe
2,724
Professional Procrastinator
Featured Poster
Recommended Answers
Jump to PostFor smaller projects I place enums in a project-level Enumerations.cs file. For larger projects I tend to break things down into folders where each folder holds related stuff and might have its own Enumerations.cs file.
For tiny projects or strongly self-contained classes where only the class needs access to it, …
All 3 Replies
deceptikon
1,790
Code Sniper
Team Colleague
Featured Poster
ddanbe
2,724
Professional Procrastinator
Featured Poster
RichardGalaviz
15
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.