If I run the code "as is" and calls testMethod (), I get ...
<testClass1 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://tempuri.org/">
<Name>stackoverflow</Name>
<testClass2Object>
<TestProperty>2</TestProperty>
</testClass2Object>
</testClass1>
Do you expect anything else? Maybe I missed something.
If this is part of a larger project, perhaps try putting that particular code in a new project and see if it could be a parameter or another type of problem configuration.
source
share