Enables serialization of custom exception data in security-transparent code.
Assembly: mscorlib (in mscorlib.dll)
Thetype exposes the following members.
In versions previous to.NET Framework 4.0, serialization of custom user data in a security transparent code was accomplished using the GetObjectData method. Starting with .NET Framework 4.0, that method is marked with the SecurityCriticalAttribute attribute which prevents execution in security-transparent code. To work around this condition, implement the ISafeSerializationDatainterface and add custom data as shown in the example below.
The CompleteDeserialization method is called after serialization, and uses the SafeSerializationEventArgs to restore the custom data.
Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.