Consider the following serializable classes:
class Item {...}
class Items : List<Item> {...}
class MyClass
{
public string Name {get;set;}
public Items MyItems {get;set;}
}
I want the serialized output to look like this:
<MyClass>
<Name>string</Name>
<ItemValues>
<ItemValue></ItemValue>
<ItemValue></ItemValue>
<ItemValue></ItemValue>
</ItemValues>
</MyClass>
Please note that the item names ItemValues and ItemValue do not match the names of the Item and Items classes, if I cannot change the Item or Items class, are there any reasons for specifying the item names that I want by changing the MyClass class
source
share