-
Notifications
You must be signed in to change notification settings - Fork 1
Serialization Design
T145 edited this page Nov 5, 2018
·
3 revisions
A game object is saved as a string in an XML format using XML encoding extension helper methods.
string dataStr = gameObj.XmlSerializeToString();
Through these same helper methods, we can read back our object from the XML encoded string. By simply using the following call and assigning the returned, configured object to a variable, we'll have our old object back:
var gameObj = dataStr.XmlDeserializeFromString<GameObjType>();