Saves an object to a file in a specified format.
Namespace: Cognex.VisionProAssembly: Cognex.VisionPro.Core (in Cognex.VisionPro.Core.dll) Version: 91.0.0.0
public static void SaveObjectToFile(
Object obj,
string path,
Type formatterType
)
public static void SaveObjectToFile(
Object obj,
string path,
Type formatterType
)
Public Shared Sub SaveObjectToFile (
obj As Object,
path As String,
formatterType As Type
)
Public Shared Sub SaveObjectToFile (
obj As Object,
path As String,
formatterType As Type
)
public:
static void SaveObjectToFile(
Object^ obj,
String^ path,
Type^ formatterType
)
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. Use a BinaryFormatter to save the object as binary data. For example, to use the BinaryFormatter in C# you would type: typeof(System.Runtime.Serialization.Formatters.Binary.BinaryFormatter)
To learn more about persisting objects, see
Persistence in VisionPro