3 ms·
> To me having a separate class to deserialize each kind of XML document to its respective object You mean a separate function? Or a separated method in some c
by marcosdumay 2y ago
> To me having a separate class to deserialize each kind of XML document to its respective object
You mean a separate function? Or a separated method in some class? (Given that C# can't do top level functions...)
Or else, you may want a type parametrized function that uses reflection to populate an object of any class you want. That would depend on how many different kinds of file you have, but the C# standard library has this function so you just use it.