Skip to main content
1 of 4

Single File for different versions of a configuration file

Please suggest best design for accomodating different versions of configuration file into a single file.My requirement is I have 3 different versions of a configuration say V1.config,V2.config,V3.config .The different versions needs to be supported.I would like to achieve a file V.config from which I can read configuration info of all differnt versions. What is the best practise usually followed ,what would be possible design.

To help visualize: V1.config would be something like:

[A\A1]
/*section for config info */
[A\A2]
/*section for config info */

[A\A3]
/*section for config info */

V2.config

[A\A1]
    /*section for config info */
    
/* Removed a section */
    
[A\A3]
    /*section for config info */
[A\A4]
    /*Added new section for config info */

V3.config

 [A\A1]
    /*section for config info */
 [A\A2]
    /*Re-introduced the section in Version V1 for config info */
    

 /* Removed a section in Version V2 */
 [A\A4]
    /*section for config info */