Method OnBeforeSerialize OnBeforeSerialize() Called by the serialization module, used to dump the .type to the .data. Declaration public void OnBeforeSerialize() Implements ISerializationCallbackReceiver.OnBeforeSerialize()