In C#, I have a situation where I get a random XMLSchema and I need to find which class that it should be serialized into.
At the moment I have a hard coded switch that checks IDs and matches the class type. However this isnt very dynamic and needs to be changed every time a new XMLSchema is added. Im trying to think of a more dynamic approach.
My first thought would be to loop through the types to see which one matches. But im not sure if this is possible or if its even a good idea.