mscorlib 1.0.5000.0 2.0.0.0 2.0.5.0 4.0.0.0 netstandard 2.0.0.0 2.1.0.0 System.Runtime.Serialization.Formatters 4.0.2.0 4.0.3.0 4.0.4.0 5.0.0.0 6.0.0.0 7.0.0.0 8.0.0.0 8.1.0.0 9.0.0.0 10.0.0.0 System.Object System.Runtime.Serialization.IFormatter System.Runtime.Remoting.Messaging.IRemotingFormatter [System.Obsolete("BinaryFormatter serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId="SYSLIB0011", UrlFormat="https://aka.ms/dotnet-warnings/{0}")] [<System.Obsolete("BinaryFormatter serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId="SYSLIB0011", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>] [System.Runtime.CompilerServices.Nullable(0)] [<System.Runtime.CompilerServices.Nullable(0)>] [System.Runtime.InteropServices.ComVisible(true)] [<System.Runtime.InteropServices.ComVisible(true)>] Serializes and deserializes an object, or an entire graph of connected objects, in binary format. Warning: BinaryFormatter is insecure and can't be made secure. For more information, see the BinaryFormatter security guide. The in-box implementation of BinaryFormatter was removed in .NET 9. For more information, see BinaryFormatter migration guide. mscorlib 2.0.5.0 4.0.0.0 Initializes a new instance of the class. Constructor mscorlib 1.0.5000.0 2.0.0.0 2.0.5.0 4.0.0.0 netstandard 2.0.0.0 2.1.0.0 System.Runtime.Serialization.Formatters 4.0.2.0 4.0.3.0 4.0.4.0 5.0.0.0 6.0.0.0 7.0.0.0 8.0.0.0 8.1.0.0 10.0.0.0 Initializes a new instance of the class with default values. object as follows: |Property Type|Condition| |-------------------|---------------| ||`null`| ||A with a value that indicates that serialized data can be transmitted to or received from any of the other contexts. ()| ]]> Constructor mscorlib 1.0.5000.0 2.0.0.0 2.0.5.0 4.0.0.0 netstandard 2.0.0.0 2.1.0.0 System.Runtime.Serialization.Formatters 4.0.2.0 4.0.3.0 4.0.4.0 5.0.0.0 6.0.0.0 7.0.0.0 8.0.0.0 8.1.0.0 10.0.0.0 The to use. Can be . The source and destination for the serialized data. Initializes a new instance of the class with a given surrogate selector and streaming context. . The serialization or deserialization process uses the specified to search for surrogates that are registered for the object types you want to deserialize. Surrogates are helpers that serialize and deserialize objects of specific classes. The default cannot handle the serialization of objects that derive from the for remoting purposes. In a remoting situation the specified replaces the object derived from with a object that is serialized by the specified surrogate selector. Therefore, if you want to use remote objects, set the `selector` parameter to an instance of . If you do not need surrogates, set the `selector` parameter to be `null`. ]]> Property mscorlib 1.0.5000.0 2.0.0.0 2.0.5.0 4.0.0.0 netstandard 2.0.0.0 2.1.0.0 System.Runtime.Serialization.Formatters 4.0.2.0 4.0.3.0 4.0.4.0 5.0.0.0 6.0.0.0 7.0.0.0 8.0.0.0 8.1.0.0 10.0.0.0 System.Runtime.Serialization.Formatters.FormatterAssemblyStyle Gets or sets the behavior of the deserializer with regards to finding and loading assemblies. One of the values that specifies the deserializer behavior. Property P:System.Runtime.Serialization.IFormatter.Binder mscorlib 1.0.5000.0 2.0.0.0 2.0.5.0 4.0.0.0 netstandard 2.0.0.0 2.1.0.0 System.Runtime.Serialization.Formatters 4.0.2.0 4.0.3.0 4.0.4.0 5.0.0.0 6.0.0.0 7.0.0.0 8.0.0.0 8.1.0.0 10.0.0.0 System.Runtime.Serialization.SerializationBinder (Insecure) Gets or sets an object of type that controls the binding of a serialized object to a type. The serialization binder to use with this formatter. Property P:System.Runtime.Serialization.IFormatter.Context mscorlib 1.0.5000.0 2.0.0.0 2.0.5.0 4.0.0.0 netstandard 2.0.0.0 2.1.0.0 System.Runtime.Serialization.Formatters 4.0.2.0 4.0.3.0 4.0.4.0 5.0.0.0 6.0.0.0 7.0.0.0 8.0.0.0 8.1.0.0 10.0.0.0 System.Runtime.Serialization.StreamingContext Gets or sets the for this formatter. The streaming context to use with this formatter. provides an enumeration that describes the source and the destination for a given serialized stream, as well as a way for serialization to retain that context and an additional caller-defined context. ]]> mscorlib 2.0.5.0 4.0.0.0 Deserializes a stream into an object graph. Method M:System.Runtime.Serialization.IFormatter.Deserialize(System.IO.Stream) mscorlib 1.0.5000.0 2.0.0.0 2.0.5.0 4.0.0.0 netstandard 2.0.0.0 2.1.0.0 System.Runtime.Serialization.Formatters 4.0.2.0 4.0.3.0 4.0.4.0 5.0.0.0 6.0.0.0 7.0.0.0 8.0.0.0 8.1.0.0 10.0.0.0 [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("BinaryFormatter serialization uses dynamic code generation, the type of objects being processed cannot be statically discovered.")] [<System.Diagnostics.CodeAnalysis.RequiresDynamicCode("BinaryFormatter serialization uses dynamic code generation, the type of objects being processed cannot be statically discovered.")>] [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("BinaryFormatter serialization is not trim compatible because the type of objects being processed cannot be statically discovered.")] [<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("BinaryFormatter serialization is not trim compatible because the type of objects being processed cannot be statically discovered.")>] [System.Obsolete("BinaryFormatter serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId="SYSLIB0011", UrlFormat="https://aka.ms/dotnet-warnings/{0}")] [<System.Obsolete("BinaryFormatter serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId="SYSLIB0011", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>] [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("BinaryFormatter serialization is not trim compatible because the Type of objects being processed cannot be statically discovered.")] [<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("BinaryFormatter serialization is not trim compatible because the Type of objects being processed cannot be statically discovered.")>] [System.Security.SecuritySafeCritical] [<System.Security.SecuritySafeCritical>] System.Object The stream from which to deserialize the object graph. Deserializes the specified stream into an object graph. The top (root) of the object graph. The is . The supports seeking, but its length is 0. -or- The input stream does not represent a well-formed serialized payload. -or- An error occurred while deserializing an object from the input stream. The property may contain more information about the root cause. The caller does not have the required permission. ASP.NET Core 5-8: Always thrown unless functionality is re-enabled in the project file. For more information, see Resolving BinaryFormatter obsoletion and disablement errors. .NET 9 and later versions: In all cases. For more information, see BinaryFormatter migration guide. Method M:System.Runtime.Remoting.Messaging.IRemotingFormatter.Deserialize(System.IO.Stream,System.Runtime.Remoting.Messaging.HeaderHandler) mscorlib 1.0.5000.0 2.0.0.0 4.0.0.0 System.Runtime.Serialization.Formatters netstandard [System.Security.SecuritySafeCritical] [<System.Security.SecuritySafeCritical>] System.Object The stream from which to deserialize the object graph. The that handles any headers in the . Can be . Deserializes the specified stream into an object graph. The provided handles any headers in that stream. The deserialized object or the top object (root) of the object graph. The is . The supports seeking, but its length is 0. -or- The target type is a , but the value is out of range of the type. The caller does not have the required permission. Method mscorlib 1.0.5000.0 2.0.0.0 4.0.0.0 System.Runtime.Serialization.Formatters netstandard [System.Security.SecuritySafeCritical] [<System.Security.SecuritySafeCritical>] System.Object The stream from which to deserialize the object graph. The that handles any headers in the . Can be . The that contains details about where the call came from. Deserializes a response to a remote method call from the provided . The deserialized response to the remote method call. The is . The supports seeking, but its length is 0. The caller does not have the required permission. Property mscorlib 1.0.5000.0 2.0.0.0 2.0.5.0 4.0.0.0 netstandard 2.0.0.0 2.1.0.0 System.Runtime.Serialization.Formatters 4.0.2.0 4.0.3.0 4.0.4.0 5.0.0.0 6.0.0.0 7.0.0.0 8.0.0.0 8.1.0.0 10.0.0.0 [System.Runtime.InteropServices.ComVisible(false)] [<System.Runtime.InteropServices.ComVisible(false)>] System.Runtime.Serialization.Formatters.TypeFilterLevel Gets or sets the of automatic deserialization the performs. The that represents the current automatic deserialization level. and (the default). For details about deserialization levels, see [Automatic Deserialization in .NET Framework Remoting](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/5dxse167(v=vs.100)). ]]> mscorlib 2.0.5.0 4.0.0.0 Serializes an object, or graph of connected objects, to the given stream. Method M:System.Runtime.Serialization.IFormatter.Serialize(System.IO.Stream,System.Object) mscorlib 1.0.5000.0 2.0.0.0 2.0.5.0 4.0.0.0 netstandard 2.0.0.0 2.1.0.0 System.Runtime.Serialization.Formatters 4.0.2.0 4.0.3.0 4.0.4.0 5.0.0.0 6.0.0.0 7.0.0.0 8.0.0.0 8.1.0.0 10.0.0.0 [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("BinaryFormatter serialization is not trim compatible because the type of objects being processed cannot be statically discovered.")] [<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("BinaryFormatter serialization is not trim compatible because the type of objects being processed cannot be statically discovered.")>] [System.Obsolete("BinaryFormatter serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId="SYSLIB0011", UrlFormat="https://aka.ms/dotnet-warnings/{0}")] [<System.Obsolete("BinaryFormatter serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId="SYSLIB0011", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>] [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("BinaryFormatter serialization is not trim compatible because the Type of objects being processed cannot be statically discovered.")] [<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("BinaryFormatter serialization is not trim compatible because the Type of objects being processed cannot be statically discovered.")>] [System.Security.SecuritySafeCritical] [<System.Security.SecuritySafeCritical>] System.Void The stream to which the graph is to be serialized. The object at the root of the graph to serialize. Serializes the object, or graph of objects with the specified top (root), to the given stream. The is . -or- The is null. An error has occurred during serialization, such as if an object in the parameter is not marked as serializable. The caller does not have the required permission. ASP.NET Core 5-8: Always thrown unless functionality is re-enabled in the project file. For more information, see Resolving BinaryFormatter obsoletion and disablement errors. .NET 9 and later versions: In all cases. For more information, see BinaryFormatter migration guide. Method M:System.Runtime.Remoting.Messaging.IRemotingFormatter.Serialize(System.IO.Stream,System.Object,System.Runtime.Remoting.Messaging.Header[]) mscorlib 1.0.5000.0 2.0.0.0 4.0.0.0 System.Runtime.Serialization.Formatters netstandard [System.Security.SecuritySafeCritical] [<System.Security.SecuritySafeCritical>] System.Void The stream to which the object is to be serialized. The object at the root of the graph to serialize. Remoting headers to include in the serialization. Can be . Serializes the object, or graph of objects with the specified top (root), to the given stream attaching the provided headers. The is . An error has occurred during serialization, such as if an object in the parameter is not marked as serializable. The caller does not have the required permission. Property P:System.Runtime.Serialization.IFormatter.SurrogateSelector mscorlib 1.0.5000.0 2.0.0.0 2.0.5.0 4.0.0.0 netstandard 2.0.0.0 2.1.0.0 System.Runtime.Serialization.Formatters 4.0.2.0 4.0.3.0 4.0.4.0 5.0.0.0 6.0.0.0 7.0.0.0 8.0.0.0 8.1.0.0 10.0.0.0 System.Runtime.Serialization.ISurrogateSelector Gets or sets a that controls type substitution during serialization and deserialization. The surrogate selector to use with this formatter. to generate instances for objects that derive from . ]]> Property mscorlib 1.0.5000.0 2.0.0.0 2.0.5.0 4.0.0.0 netstandard 2.0.0.0 2.1.0.0 System.Runtime.Serialization.Formatters 4.0.2.0 4.0.3.0 4.0.4.0 5.0.0.0 6.0.0.0 7.0.0.0 8.0.0.0 8.1.0.0 10.0.0.0 System.Runtime.Serialization.Formatters.FormatterTypeStyle Gets or sets the format in which type descriptions are laid out in the serialized stream. The style of type layouts to use. Method mscorlib 1.0.5000.0 2.0.0.0 4.0.0.0 System.Runtime.Serialization.Formatters netstandard [System.Runtime.InteropServices.ComVisible(false)] [<System.Runtime.InteropServices.ComVisible(false)>] [System.Security.SecurityCritical] [<System.Security.SecurityCritical>] System.Object The stream from which to deserialize the object graph. The that handles any headers in the . Can be . Deserializes the specified stream into an object graph. The provided handles any headers in that stream. The deserialized object or the top object (root) of the object graph. The is . The supports seeking, but its length is 0. The caller does not have the required permission. Method mscorlib 1.0.5000.0 2.0.0.0 4.0.0.0 System.Runtime.Serialization.Formatters netstandard [System.Runtime.InteropServices.ComVisible(false)] [<System.Runtime.InteropServices.ComVisible(false)>] [System.Security.SecurityCritical] [<System.Security.SecurityCritical>] System.Object The stream from which to deserialize the object graph. The that handles any headers in the . Can be . The that contains details about where the call came from. Deserializes a response to a remote method call from the provided . The deserialized response to the remote method call. The is . The supports seeking, but its length is 0. The caller does not have the required permission.