So what I want to do is pass in an object list, but I have many different ones. (Swords, Chestplates etc). How can I pass in multiple objects to the parameter?
ListToSave = testObject.ChestPlateList;
that part below is the part I want to pass the object list into.
public void DeserializeFromXML(List<ChestPlate> ListToSave, string filepath)
{
XmlSerializer deserializer = new XmlSerializer(typeof(GameObjectData));
FileStream fs = new FileStream(filepath, FileMode.Open);
XmlReader reader = new XmlTextReader(fs);
if (!reader.EOF)
{
GameObjectData testObject = (GameObjectData)deserializer.Deserialize(reader);
ListToSave = testObject.ChestPlateList;
Console.WriteLine("{0}", testObject.ChestPlateList);
}
}