Serializes an object to an XML string. Unlike the other SerializeObject overloads this methods *returns a string* rather than a bool result!
public static string SerializeObjectToString(object instance,
bool throwExceptions);
Return Value
null on error otherwise the Xml String.
Parameters
instancethrowExceptions
Determines if a failure throws or returns null
If null is passed in null is also returned so you might want to check for null before calling this method.
See also:
Class SerializationUtils