AdvantageCMS.Core.Common.BaseClasses Namespace
Advantage CSP

ObjectXMLSerializer<(Of <(<'T>)>)>..::..Save Method (T, String, array<Type>[]()[][])

Saves an object to an XML file in Document format, supplying extra data types to enable serialization of custom types within the object.

Namespace:  AdvantageCMS.Core.Utils
Assembly:  AdvantageCMS.Core (in AdvantageCMS.Core.dll)

Syntax


public static void Save(
	T serializableObject,
	string path,
	Type[] extraTypes
)

Parameters

serializableObject
Type: T
Serializable object to be saved to file.
path
Type: String
Path of the file to save the object to.
extraTypes
Type: array<Type>[]()[][]
Extra data types to enable serialization of custom types within the object.

Examples


C#
SerializableObject serializableObject = new SerializableObject();
ObjectXMLSerializer<SerializableObject>.Save(serializableObject, @"C:\XMLObjects.xml", new Type[] { typeof(MyCustomType) });