I want to check our configuration file and see if it is the same as if I were to create a new configuration file. This method is called GetConfig().
After some hours
You cannot make any assumption about the order of return values of Type.GetProperties
, see what documentation says:
The GetProperties method does not return properties in a particular order, such as alphabetical or declaration order. Your code must not depend on the order in which properties are returned, because that order varies.
If you want an specific order, you should make your code order the collection returned.