I want to create a custom XML structure as follows:
<Hotels>
<Hotel />
</Hotels>
I've created an implementation of List
just to be able to do this. My code is as follows:
[XmlRootAttribute(ElementName="Hotels")]
public class HotelList: List<HotelBasic>
Because the class that List holds is not named Hotel
but HotelBasic
my xml is like
<Hotels>
<HotelBasic />
</Hotels>
How do I fix this without having to implement ISerializable
or IEnumerable
?