Is reflection and XML persistance a WTF?

  • There is a C# service I have come accross that saves and loads its settings using a combination of the .net XML classes and reflection. The code iterates over a class using reflection and then creates an XML document based on the values of the properties. Is this a WTF or is this common practice?

  • Is there any good reason for not using XMLSerializer? Perhaps they're trying to be compatible with some external tool? If not, I would say that this is a WTF.

Log in to reply

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.