Basically, I have a class defined in my website which contains a bunch of Enums to define some constant numbers. Whenever the website updates to a new version, it will (and should) use the original class definition. In some rare cases I need to overwrite the values of these Enums per website. So I was thinking I could drop a customised file into the website that redefines the original class with the “override” statement, so that the original file will always stay the same, but not get used.
HOWEVER, when I add the file it of course throws the error: ‘className’ already contains a definition for ‘enumName’.
Any help/ideas would be greatly appreciated.
Example:
public enum PageIDs
{
Login = 2,
SearchResults = 3,
DocumentsLibrary = 4,
Error = 5,
PageNotFound = 6,
NewsAndEvents = 7
}
should be replaced by:
public enum PageIDs
{
Login = 2,
SearchResults = 3,
DocumentsLibrary = 4,
Error = 9,
PageNotFound = 15,
NewsAndEvents = 17
}
if these values are changing you better design your application as configurable. you can use web config file or other configuration xml or DB.