Access specifier
Can you specify an access specifier for an enumeration in c# language?
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Pravin MoreRank #1,419 · 1.2K reputationPosted Oct 30, 2011, 9:02 PM EDT
no...Enumeration members are always public, and no access modifiers can be applied.
Thanks,
Pravin.
VulpesRank #55 · 29.2K reputationPosted Oct 31, 2011, 1:56 AM EDT
For 'top level' enums, this can be either public or internal.
For enums embedded in other types, it can be public, internal, protected internal, protected or private.
If you don't specify an access modifier, the default in all cases is internal.