Click or drag to resize
GameFilesWriteToBinaryFileT Method
Writes the given object instance to a binary file.

Object type (and all child types) must be decorated with the [Serializable] attribute.

To prevent a variable from being serialized, decorate it with the [NonSerialized] attribute; cannot be applied to properties.

Namespace:  GeonBit.Managers
Assembly:  GeonBit (in GeonBit.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
public void WriteToBinaryFile<T>(
	string filePath,
	T objectToWrite,
	bool append = false
)

Parameters

filePath
Type: SystemString
The file path to write the object instance to.
objectToWrite
Type: T
The object instance to write to the XML file.
append (Optional)
Type: SystemBoolean
If false the file will be overwritten if it already exists. If true the contents will be appended to the file.

Type Parameters

T
The type of object being written to the XML file.
See Also