src/openSourceC.DotNetLibrary.Core/XmlSerialize.cs
/// <summary>
///		Serializes the specified object and returning the XML fragment as a string.
/// </summary>
/// <param name="type">The type of the object to serialize.</param>
/// <param name="obj">The <see cref="object"/> to serialize.</param>
/// <param name="supportXsiNamespace"><b>true</b> to support xsi namespace (i.e. xsi:type,
///		xsi:nil, xsi:schema, xsi:schemaLocation, and xsi:noNamespaceSchemaLocation).</param>
/// <param name="expandForReadability"><b>true</b> to expand the XML with line feeds and
///		spacing, <b>false</b> to remove all readability formatting.</param>
/// <returns>
///		An XML formatted string representation of the object.
/// </returns>
Serializes the specified object and returning the XML fragment as a string.
Serializes the specified object and returning the XML fragment as a string .
public static string Serialize(Type type, object obj, bool supportXsiNamespace = false, bool expandForReadability = false)
		{
			using (StringWriter stringWriter = new StringWriter())
			{
				Serialize(type, obj, stringWriter, supportXsiNamespace, expandForReadability);
				return stringWriter.ToString();
			}
		}
public static string Serialize ( Type type , object obj , bool supportXsiNamespace = false , bool expandForReadability = false ) { using ( StringWriter stringWriter = new StringWriter ( ) ) { Serialize ( type , obj , stringWriter , supportXsiNamespace , expandForReadability ) ; return stringWriter . ToString ( ) ; } }
Serializes the specified object and returning the XML fragment as a string.
Serializes the specified object and returning the XML fragment as a string .
An XML formatted string representation of the object.
An XML formatted string representation of the object .
type
Type
The type of the object to serialize.
The type of the object to serialize .
obj
object
The  to serialize.
The to serialize .
supportXsiNamespace
bool
None
expandForReadability
bool
None