Is it possible to auto-generate object initialization code from a runtime object with values?
问题 Maybe a long shot, but if this existed it would save me some time. To explain in more detail. Let's say I have a long XML file and a mapped class. I want to test stuff and change values around before I run a test. I could re-construct the whole XML structure by writing C# code for initializing that mapped class, but what I want to know is - Do I absolutely have to ? So basically I want to parse a big XML File into an object at runtime and then I generate the initialization code as a string I