Click or drag to resize
SerializationWriterWriteTokenizedObject Method
Overload List
  NameDescription
Public methodWriteTokenizedObject(Object)
Writes a token (an Int32 taking 1 to 4 bytes) into the stream that represents the object instance. The same token will always be used for the same object instance. The object will be serialized once and recreated at deserialization time. Calls to SerializationReader.ReadTokenizedObject() will retrieve the same object instance.
Public methodWriteTokenizedObject(Object, Boolean)
Writes a token (an Int32 taking 1 to 4 bytes) into the stream that represents the object instance. The same token will always be used for the same object instance. When recreateFromType is set to true, the object's Type will be stored and the object recreated using Activator.GetInstance with a parameterless contructor. This is useful for stateless, factory-type classes. When recreateFromType is set to false, the object will be serialized once and recreated at deserialization time. Calls to SerializationReader.ReadTokenizedObject() will retrieve the same object instance.
Top
See Also