Returns the content of a object as a XML document.

Namespace:  SGP.XUtility
Assembly:  SGP.XUtility (in SGP.XUtility.dll)
Version: 1.2.3019.18718

Syntax

C#
public static string ObjectToXmlString(
	Object value,
	bool simple
)

Parameters

value
Type: System..::.Object
A object.
simple
Type: System..::.Boolean
Simple casting.

Return Value

A XML string corresponding to the content of a object.

Remarks

The method returns a value (content) of a object as a XML string, which is created by serialization of the object. Whether simple is trueTruetruetrue (True in Visual Basic), only a document without XML header and without XML namespace definitions is returned. System.Xml.Serialization..::.XmlSerializer

Exceptions

ExceptionCondition
System..::.ArgumentNullException value is nullNothingnullptra null reference (Nothing in Visual Basic).

See Also