Is there any design pattern or architectural design that prevent the following type of code, where I have an enum with different fileformats and I have to make a switch anywhere I want to distinguish between the different fileformats?
public enum FileFormat
FileFormat fileformat = GetFormat();
If add an item to the enum definition in this case I have to change all the code that uses switches and that kind og enum which, I guess, is a bad approach in terms on maintenance of the application?
View Complete Post