Populates a System.Runtime.Serialization.SerializationInfo with the data needed to serialize the target object.
- info
The System.Runtime.Serialization.SerializationInfo to populate with data.
- context
The destination (see System.Runtime.Serialization.StreamingContext) for this serialization.
Any objects that are included in the System.Runtime.Serialization.SerializationInfo are automatically tracked and serialized by the formatter.
Code that calls ISerializable.GetObjectData(SerializationInfo, StreamingContext) requires the System.Security.Permissions.SecurityPermission for providing serialization services. Associated enumeration: System.Security.Permissions.SecurityPermissionFlag.SerializationFormatter.
It is not guaranteed that this method will be called only once per object instance during serialization. Therefore, the method should be implemented in such a way that its behavior will be the same regardless of the number of times it is called.