I need help to serialize two lists and write them in a xml file. The code I tried is
XmlSerializer xs = new XmlSerializer(typeof(List));
XmlSe
Why not create a single class that would have both List types in it and serialize that class. like below.
public class Combined
{
public List<OtherAction> otherActions{get; set;}
public List<Action> actions{get; set;}
}
XmlSerializer xs = new XmlSerializer(typeof(List<Combined>));
using (StreamWriter sw = new StreamWriter("CombinedActions.xml"))
{
xs.Serialize(sw, listCombinedActions);
}