precompiled - C# Switch enum at runtime -
i have 2 projects reference same precompiled (c#) dll. .dll contains public enum in namespace but: both projects have use different values in enum.
is there possibility define that? (pseudo code)
namespace module { #if configurationmanager.appsettings["project"] == "extern" public enum roles { admin = 0, user = 1, vip = 2 } #else /* "intern" */ public enum roles { admin = 0, staff = 1, user = 2 } #end }
important: code has precompiled, preprocessor directive not possible.
you can have that, both can't in same namespace. have 1 module.extern.roles
, , other module.intern.roles
, if want them in same namespace, you'd have combine values single enum or change name of 1 of them.
Comments
Post a Comment