Saves an object to a string in a specified format, with option bits that cause fields to be selectively persisted.
Namespace: Cognex.VisionProAssembly: Cognex.VisionPro.Core (in Cognex.VisionPro.Core.dll) Version: 75.0.0.0
[ObsoleteAttribute("This method is deprecated.", false)]
public static string SaveObjectToString(
Object obj,
Type formatterType,
CogSerializationOptionsConstants optionBits
)[ObsoleteAttribute("This method is deprecated.", false)]
public static string SaveObjectToString(
Object obj,
Type formatterType,
CogSerializationOptionsConstants optionBits
)<ObsoleteAttribute("This method is deprecated.", false)>
Public Shared Function SaveObjectToString (
obj As Object,
formatterType As Type,
optionBits As CogSerializationOptionsConstants
) As String<ObsoleteAttribute("This method is deprecated.", false)>
Public Shared Function SaveObjectToString (
obj As Object,
formatterType As Type,
optionBits As CogSerializationOptionsConstants
) As Stringpublic:
[ObsoleteAttribute(L"This method is deprecated.", false)]
static String^ SaveObjectToString(
Object^ obj,
Type^ formatterType,
CogSerializationOptionsConstants optionBits
)
public:
[ObsoleteAttribute(L"This method is deprecated.", false)]
static String^ SaveObjectToString(
Object^ obj,
Type^ formatterType,
CogSerializationOptionsConstants optionBits
)
Parameters
- obj
- Type: System Object
The object to save.
- 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)
- optionBits
- Type: Cognex.VisionPro CogSerializationOptionsConstants
The option bits specifying what should be persisted.
Return Value
Type:
StringThe string containing the saved object.
To learn more about persisting objects, see
Persistence in VisionPro