CogSerializer SaveObjectToFile Method (Object, String, Type)Cognex VisionPro
Saves an object to a file in a specified format.

Namespace: Cognex.VisionPro
Assembly: Cognex.VisionPro.Core (in Cognex.VisionPro.Core.dll) Version: 65.1.0.0
Syntax

public static void SaveObjectToFile(
	Object obj,
	string path,
	Type formatterType
)

Parameters

obj
Type: System Object
The object to save.
path
Type: System String
The path to the file.
formatterType
Type: System Type
The type of formatter to use. You may use either a BinaryFormatter (to save the object as binary data) or a SoapFormatter (to save the object as XML text). For example, to use the SoapFormatter in C# you would type: typeof(System.Runtime.Serialization.Formatters.Soap.SoapFormatter)
Remarks

To learn more about persisting objects, see Persistence in VisionPro
See Also