/ Published in: C#
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
public static string SerializeToXmlString(object targetInstance) { string retVal = string.Empty; serializer.Serialize(writer, targetInstance); retVal = writer.ToString(); return retVal; } public static object DeserializeFromXmlString(string objectXml, Type targetType) { object retVal = null; retVal = serializer.Deserialize(xmlReader); return retVal; }