I have my enum, which I don’t want to share between layers.
So I was thinking wrapping it up would be neat.
But how ? There are many items, manualy writing down all items isn’t a solution.
Also the enum is getting generated.
I’d like to keep the intelisense.
Well, you can cast to/from
int(or the defined underlying type, which defaults toint), but this is brittle; it doesn’t protect you when somebody removes an entry causing them to be re-numbered, or changes the meaning of7fromBlah.TrivialDetailtoBlah.CriticalFail.If you want intellisense, all parties are going to need to know something about the numbers, so IMO you might just as well share the enum via some common assembly.